Code: Select all
$url = 'Removed';
$user_agent='Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, "my_cookies.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "my_cookies.txt");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$source = curl_exec($ch);
preg_match('-<Url>(.+)</Url>-', $source , $links);
for ($z = 1; $z <= count($links) ; $z++){
echo $links[$z].'<br>';
}
curl_close($ch);
Thanks alot!