Archive for the 'Web' Category

ReviewMe, Web

ReviewMe - WebHostingPal

Time ago a friend of mine talks to me about an advertising service: “ReviewMe”.
Once you signup, they look your blog and they propose to you to write about a service or a product or a site and in return they give to you a little amount of money.
I accepted to signup because ReviewMe allows you to write all you think about the product, not only good words!

Recently they ask to me to write about the site Web Hosting Pal.This site can help you to find the best web hosting for your requirements. Immediately I visited the website which I chose to promote and I thought what I can write.
Continue Reading »

News, Web

Today is Download Day

Set a Guinness World Record? YES WE CAN!
Download Day
Next World Record? Win browser war!

MySQL, Source Code, Web, php

MySQLDump backup class interface

MySQLDump class is now at version 2.0 and this article contains obsolete informations about the version 1.0. For information about the new version check this article

After the success of the article PHP backup of a mysql database, I decided to write a short post about a file that can be usefull to download the backup of your db site/wordpress blog directly from your browser.
To use the script, you can simply download it and edit the first lines with the basic configuration:

// DB Configuration
$server = "IP of your server (localhost will work in most cases)";
$username = "Valid username for your mysql db";
$password = "Password";
$dbToDump = "Db to dump";
// password to access the php page. PLEASE change the default password!!!
$backupPassword = "UltraSecretKeyThatYouMUSTInsertHere";
// filename to save
$filename = "backup.sql.gz";

After that you can upload the file to your server, in the same folder where is located the class MySQLDump.
To access the script you have to specify two parameters: the password to access the script (pass), and another parameter (t) that if it’s 1 will separate the SQL inserts every 100 rows.
For example, if you upload the file to the root directory of yoursite, you have to write in the address bar of the browser:

http://www.yoursite.com/backup.php?pass=UltraSecretKeyThatYouMUSTInsertHere&t=1

…and your favorite browser will open the dialog to save the file with the db backup!

Download MySqlDump Interface.php. Downloads: 439

For more info about the MySQLDump class, read the original post, or download the source from here:

Download MySQLDump. Downloads: 2248

MySQL, Source Code, Web, php

PHP backup of a mysql database

MySQLDump class is now at version 2.0 and this article contains obsolete informations about the version 1.0. For information about the new version check this article

I searched a way to do a daily backup of my wordpress blog in my home pc but I didn’t find nothing that completely satisfy me, so I decided to code it.
I separated the problem in two scripts:
The first, that is written in php and runs on the web server, makes the dump of mysql databases from my hosting provider and leaves the dump on the web server.
The other one (written in bash, and running locally) downloads the site and the mysql dump from the web server, via FTP. Unfortunately I discovered that my hosting provider (Aruba.it) didn’t supply with mysqldump its server.

Lamp

First of all, I searched for a php script that makes the direct dump of the database.

Continue Reading »