AUTO UPDATE

回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

AUTO UPDATE

文章 yehlu »

https://maxmorgandesign.com/simple_php_ ... te_system/

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\" />";

?>

回覆文章

回到「PHP」