Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Export for mysql

spp

Newbie Spellweaver
Joined
Dec 14, 2012
Messages
24
Reaction score
0
Work with php however without much knowledge of the serverside perfect world, look for a script that exports to the mysql character information such as name, id, farming and others that you can seder me ...

Thank you in already.​
 
Junior Spellweaver
Joined
Feb 27, 2012
Messages
188
Reaction score
19
Code:
<?php
 
/* 
 * It keeps only 31 backups of past 31 days, and backups of each 1st day of past months.
 */
 
define('DB_HOST', 'localhost');
define('DB_NAME', 'your_database_name');
define('DB_USER', 'your_database_username');
define('DB_PASSWORD', 'your_username_password');
define('BACKUP_SAVE_TO', 'backup_storage_path'); // without trailing slash
 
$time = time();
$day = date('j', $time);
if ($day == 1) {
    $date = date('Y-m-d', $time);
} else {
    $date = $day;
}
 
$backupFile = BACKUP_SAVE_TO . '/' . DB_NAME . '_' . $date . '.gz';
if (file_exists($backupFile)) {
    unlink($backupFile);
}
$command = 'mysqldump --opt -h ' . DB_HOST . ' -u ' . DB_USER . ' -p\'' . DB_PASSWORD . '\' ' . DB_NAME . ' | gzip > ' . $backupFile;
system($command);
 
?>

Have fun :)

Create HTACCESS file
Code:
Order deny,allow
Deny from all
 
Upvote 0
Angelemu founder
Joined
Mar 2, 2011
Messages
525
Reaction score
247
you dont need htaccess, if you let the values be loaded from somewhere else that is outside the apache context, or use the active session that might be around anyways.
 
Upvote 0
Back
Top