i'm trying to curl the result of http://uploadrocket.net/?op=checkfiles
and get the filesize result using curl.
i have tried the following:
function curl($url,$cookies,$post,$header=1) {
$ch = @curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, $header);
if ($cookies) curl_setopt($ch, CURLOPT_COOKIE, $cookies);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER,$url);
if ($post) {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
}
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 20);
$page = curl_exec( $ch);
curl_close($ch);
return $page;
}
$link = "http://uploadrocket.net/rlajq9dwrxey.htm";
$page = curl('http://uploadrocket.net/?op=checkfiles',"",'list='.urlencode($link).'&process=Check%20URLs');
echo $page;
but it's not working.
Thanks in advance