hey all i have this parser script and its not working on my server although it works perfect on localhost?? any ideas heres the script() <?php error_reporting(E_ALL); include ('conn.php'); set_time_limit(5000); function grablinks($site) { $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, $site); ob_start(); // prevent any output return curl_exec($ch); // execute the curl command ob_end_clean(); // stop preventing output curl_close($ch); } function pageget($page) { $data = grablinks("http://domain.com/pageg/$page"); preg_match_all('/<a target=\"_blank\" href=\"(.*?)\">(.*?)<\/a><\/td>/si',$data, $subdata); $c = count($subdata[1]); $name = $subdata[2]; $link = $subdata[1]; //echo "<pre>"; //var_dump($subdata); //echo "<pre>"; //echo "<pre>Page: ".$page. "<br></pre>"; $maxget = 50; // amount of downloads per page for ($e = 1; $e < $maxget; $e++) { // $split = preg_split("/\//",$link[$e]); //print_r($name[$e] . "<br>".$link[$e]."<br>"); mysql_real_escape_string(mysql_query("INSERT INTO `step`.`get` (`id`, `url`, `name`, `type`, `site`) VALUES (NULL,'$link[$e]','$name[$e]','', '4');")); } } $pg = 30; // Pages -1 for ($i = 1; $i < $pg; $i++) { pageget($i); if ($i == $pg){die; } } ?> PHP: and the server info is here http://www.litewarez.com/info.php any ideas?
add echo curl_error($ch); into the curl code to see if that is causing your issues. Have you tried just echoing out the returned data to see if it is pulling back anything ?
ill try that + i have tried returning the data in the function and still nothing going on .. thanks will try