Yeh, its all got comments so you can easily work out what to do with it.
I re-wrote it all as my old coding was VERY messy compared to what it is now.
Hope you enjoy it, dom
PHP Code:
<?php
/*
** ** || ** NO MIRRORS PLEASE ** || ** ** || ** ** || ** ** || ** ** || **
** Doms script updater V1
** Free release
** Please respect my time and leave the copyright as it is. Thanks
** Need support? eMail: [email protected]
** Need to report a bug? eMail? [email protected]
*/
//Delete the files below.
function delete($file) {
unlink($file);
}
// IF YOU DO NOT WANT TO DELETE ANY FILES, DO NOT UNCOMMENT THE BELOW. OTHERWISE, YOU MAY. Though, it is always better to start fresh.
//delete("error_log"); // Copy and paste more delete(""); functions for more files you want to delete
//Rebuilding the latest file
$create['filename'] = "testfile.php"; // Where testfile.php is the file you are creating, and "filename" is the filevar
$handler['filename'] = fopen($create['filename'], w); // Where $handler['filename'] is the file var, and $create['filename'] is the page from the last step
// Copy and paste them above changing the vars if you need more.
//Copy data from the latest files into the updating files
$updatefile['filename'] = "testfile.php";
$updater['filename'] = fopen($updaterfile['filename'], 'w') or die(" Could not open ".$updatefile['filename']."!");
///
// Get remote files //
//!! THE LATEST VERSION OF THE FILE MUST BE A .txt FILE!! !!\\
$testfiles = @file_get_contents("http://www.yoursite.com/path/to/latest/file.TXT");
fwrite($updater['filename'], $testfiles);
fclose($updater['filename']);
// Now, you should of guessed what to do with that like you did with the other steps (copy + paste + changevars)
?>
<center><b><a href='http://forum.truecrimegaming.com'>TCG PHP Script Updater.</a> || <a href='http://forum.truecrimegaming.com/showthread.php?p=93#post93'>Get it here!</a> </b></center>