Bir Json Dosyasindan PHP İle Verileri Alamiyorum
-
su sekildeki bir json icinden
$file='{
"UserChannels": [
{
"Language": "Turkish",
"Type": "0",
"SongId": "226961",
"Name": "4 Show T\u00fcrk",
"UserId": "349605",
"URL": "http://bilinmeyenbirsaydaki.com.film.m3u8",
"LikeCount": "0",
"ViewByAll": "6977",
"Code": "358144",
"Privacy": "0",
"LastOnline": "2016-11-06",
"UserName": "kernil",
"RateCount": "1",
"AverageRating": "5",
"ShowURL": "1",
"CategoryName": "General",
"CategoryImagePath": "http://general.com/icon.png"
},
{
"Language": "Turkish",
"Type": "0",
"SongId": "226983",
"Name": "13 Kanal 7 HD",
"UserId": "349605",
"URL": "http://bilinmeyenbirsaydaki.com.film.m3u8",
"LikeCount": "0",
"ViewByAll": "95",
"Code": "574371",
"Privacy": "0",
"LastOnline": "2016-11-01",
"UserName": "kernil",
"RateCount": "0",
"AverageRating": "0",
"ShowURL": "1",
"CategoryName": "General",
"CategoryImagePath": "http://general.com/icon.png"
},
{
"Language": "English",
"Type": "0",
"SongId": "226984",
"Name": "14 Kanal 7 Avrupa",
"UserId": "349605",
"URL": "http://bilinmeyenbirsaydaki.com.film.m3u8",
"LikeCount": "0",
"ViewByAll": "337",
"Code": "846444",
"Privacy": "0",
"LastOnline": "2016-10-24",
"UserName": "kernil",
"RateCount": "0",
"AverageRating": "0",
"ShowURL": "1",
"CategoryName": "General",
"CategoryImagePath": "http://general.com/icon.png"
},
{
"Language": "English",
"Type": "0",
"SongId": "226070",
"Name": "30 SuperSpo 3",
"UserId": "349605",
"URL": "http:\/\/81.7.13.162\/hls\/ss3\/index.m3u8",
"LikeCount": "0",
"ViewByAll": "19",
"Code": "199553",
"Privacy": "0",
"LastOnline": "2016-10-24",
"UserName": "kernil",
"RateCount": "1",
"AverageRating": "3",
"ShowURL": "1",
"CategoryName": "General",
"CategoryImagePath": "http:\/\/edge.mdcgate.com\/livemedia\/public\/icon\/general_icon.png"
}
],
"Result": "Success",
"Reason": ""
}';bu yukardaki jsondan languege,name ve Url kisimlarini su sekilde cekmeye calisiyorum ama olmuyor.
$sinir = count($json);
for($i=0;$i<$sinir;$i++)
{echo $json[$i]->Language;
echo $json[$i]->Name;
echo $json[$i]->URL;}
-
-