I am trying to run a script that requires a lot of time to process and I don’t have access to any configuration files on the shared server. Would appreciate advice or suggestions of how to get this done the best way.
Code:
[php]
<?PHP include('objconnect.php'); (I know, I will update to "improved" very soon.) $strSQL = "SELECT id, price FROM products ORDER BY id"; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); while($objResult = mysql_fetch_array($objQuery)){ $id=$objResult["id"]; $origprice=$objResult["price"]; $url='http://site.com/'.$id; include('simple_html_dom.php'); include('funcextract.php'); $fp=file_get_contents($url); $html = str_get_html($fp); $string = $html->find("div",8); $cost = extract_unit($string, 'Price>','query("UPDATE products SET price='$sellprice' WHERE id= '$id' ");} if(!$results){echo mysqli_error($link);} ?> <? mysqli_close($link); ?> <? } echo 'Done'; ?>[/php]