AUTO UPDATE
發表於 : 2013-07-30 11:54:40
https://maxmorgandesign.com/simple_php_ ... te_system/
http://www.hotscripts.com/forums/php/56 ... -help.html
http://www.hotscripts.com/forums/php/56 ... -help.html
代碼: 選擇全部
<?php
$hostfile = fopen("URL TO UPDATE FILE", 'r');
$fh = fopen("latest.zip", 'w');
while (!feof($hostfile)) {
$output = fread($hostfile, 8192);
fwrite($fh, $output);
}
fclose($hostfile);
fclose($fh);
require_once('pclzip.lib.php');
$archive = new PclZip('latest.zip');
if (($v_result_list = $archive->extract()) == 0) {
die("Error : ".$archive->errorInfo(true));
}
echo "<pre>";
echo "</pre>";
unlink('latest.zip');
echo "<meta http-equiv=\"refresh\" content=\"3;url=EXTRA SCRIPT OPTIONS.PHP\" />";
?>