Hi all
i am trying to use curl function recursively but when the function first execute it get the content but next time it give the following error
Protocol http not supported or disabled in libcurl
$url = "http://www.example.com";
pager($url);
function pager($url){
$urlArray = array();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
echo curl_error($ch);
// code to get url from result
// i get an array here $urlArray
curl_close($ch);
foreach($urlArray as $value){
$urlval = urlget($value);
if($urlval)
{
$urlval = str_replace("href=","",$urlval);
$urlval = str_replace("'","",$urlval);
echo $urlval.'<br>';
pager($urlval);
}
}
}