• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

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