Şu kodları bir dene muhtemelen sorun kalmayacaktır, ci kodlarını inceleme fırsatım yok ama yine çalışmazsa buraya is_ajax_request methodunun içeriğini yazarsan net çözümü belirtirim.
function cek_gelsin($sayfam)
{
$ch = curl_init();
//$ch = curl_init('http://example.com/service/get_video_part');
$data = array("video_id" => "$sayfam", "part_name" => "480p", "page" => "0");
// "video_id=$sayfam&part_name=480p&page=0"
$data_string = json_encode($data);
curl_setopt($ch, CURLOPT_URL, 'http://example.com/service/get_video_part');
//cache:false
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'X-Requested-With: XMLHttpRequest',
'Accept: application/json, text/javascript, */*; q=0.01"',
'Content-Type: application/json; charset=utf-8',
'Content-Length: ' . strlen($data_string))
);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
//curl_setopt($ch, CURLOPT_REFERER, 'http://www.cloudflare-watch.org/cgi-bin/cfsearch.cgi');
curl_setopt($ch, CURLOPT_REFERER, 'http://example.com/referer-adress.html');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
//curl_setopt($ch, CURLOPT_POSTFIELDS, "video_id=$sayfam&part_name=Alternatif+&page=0");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
$exec = trim(curl_exec($ch));
curl_close($ch);
return $exec;
}
$dene="64";
echo cek_gelsin($dene);