i have a php file that return json. here my php file.
http://dev.mediaodd.com/data/testjson.php
if i use writing testjson.json file it will success but if i use .php it will failed.
this is my output script:
<?php
// copy file content into a string var
$jsondata = file_get_contents('http://dev.mediaodd.com/data/testjson.php');
$obj = json_decode($jsondata,true);
echo $obj['company'][0]['id'];
?>
what did i do wrong?
file_get_contents cant read .php file?
my testjson.php file return same as testjason.json file.