Unable to load $sourcepage - Static page! Update Failed!"; exit(); } $htmldata = fread($dynamic_source, 1024*1024); fclose($dynamic_source); **/ $tempfile = fopen($tempfilename, 'w'); if (!$tempfile) { $err = "write_error"; } fwrite($tempfile, $htmldata); fclose($tempfile); copy($tempfilename, $targetfilename); unlink($tempfilename); } function staticify_all($eventID) { $db = mysql_connect("192.168.1.10", "slowtwitch", "k9volqlAcpq"); mysql_select_db("ticker",$db); $query = "SELECT ID FROM stages WHERE eventID = ${eventID} AND status != 'complete'"; $result = mysql_query($query, $db); if ($result) { while ($r = mysql_fetch_array($result)) { $stageID = $r['ID']; staticify($stageID); } } } function staticify_old($stageID) { //$s = "/usr/bin/wget -O /var/www/html/one/tick/html/stage${stageID}.html 'http://www.onemillionrevolutions.org/tick/viewer.php?ID=${stageID}&link=static'"; //exec("$s 2>&1", $updw); //$s = "/usr/bin/wget -O /var/www/html/one/tick/html/stage${stageID}_mobile.html 'http://www.onemillionrevolutions.org/tick/viewer_mobile.php?ID=${stageID}&link=static'"; //exec("$s 2>&1", $updw); } function staticify_all_old($eventID) { //$db = mysql_connect("localhost", "web", "jalapeno"); //mysql_select_db("ticker",$db); //$query = "SELECT ID FROM stages WHERE eventID = ${eventID}"; //$result = mysql_query($query, $db); //if ($result) //{ //while ($r = mysql_fetch_array($result)) //{ //$stageID = $r['ID']; //staticify($stageID); //} //} } ?>