<?php
$dbhost = 'localhost';
$dbuser = '';
$dbpassword = '';
$dbname = '';
$dumpfile = 'backup/'. $dbname . '_' . date("Y-m-d_H-i-s") . '.sql';


include_once('mysqldump.php');
$dump = new Ifsnop\Mysqldump\Mysqldump("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpassword);
$dump->start($dumpfile);

?>