lundi 29 février 2016

This video importer code is not working I do not know why

<?php
$searchqry = $_GET['searchqry'];
$thePage = $_GET['page'];
$cat = $_GET['category_id'];
$curl_connection = curl_init();
if(empty($searchqry) && empty($cat)){
    $url = "http://ift.tt/1TNpqNy".$thePage;
}elseif(empty($searchqry) && !empty($cat)){
    $url = "http://ift.tt/1oLeDrf".$cat."&page=".$thePage;
}elseif(empty($cat)){
    $url = "http://ift.tt/1TNpoVT".$searchqry."&page=".$thePage;
}else{
    $url = "http://ift.tt/1TNpoVT".$searchqry."&filter_category=".$cat."&page=".$thePage;
}
curl_setopt($curl_connection, CURLOPT_URL, $url);
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($curl_connection, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl_connection, CURLOPT_HEADER, true);
curl_setopt($curl_connection, CURLOPT_REFERER, "http://www.abcd.com/");
$result = curl_exec($curl_connection);
echo $result;

?>

I tried again and again to just scrape video page and categorywise but I am unable to find a solution unfortunately.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire