Odn den link cekmeye calisiyorsunuz sanirim orasi istek gelen ip ye gore ciktiyi degistiriyor yani sorun cikmaz bu sekilde kullanin derim
edit:
<?php
function curl_cek($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_NOBODY, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0');
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_MAXREDIRS, 1);
$rmx = curl_exec($ch);
curl_close($ch);
return $rmx;
}
$bir=curl_cek('http://ok.ru/dk?cmd=videoPlayerMetadata&mid=34652883501');
$obj = json_decode($bir,true);
//print_r($obj);
for($i=0;$i<count($obj['videos']);$i++){
if($obj['videos'][$i]['name']!='mobile' && $obj['videos'][$i]['name']!='lowest'){
echo $obj['videos'][$i]['url'].'<br>';
}
}Bu şekilde sorunsuz kullanılıyor. Kendine göre düzenleyebilirsin.
foreach($return as $dongu){
natsort($dongu); yaparak deneyin birde.
Yok hocam malesef olmuyor.. Bu arada son mesajdan alıntı özelliği aktif değildi o yüzden alıntı yap diyince hepsini alıntı yaptı: (
foreach($return as $dongu){
natsort($dongu);
$text = '{"file":"'.$dongu['file'].'","type":"'.$dongu['type'].'","name":"'.$degisken.'"},
';
echo rtrim($text,',');
$i++; }