[insert_php]
$jsonurl=”http://fipak.areo.ir/rest/news/bibliographic/listBiblio”;
try {
$context = stream_context_create(
array(
‘http’ => array(
‘follow_location’ => true,
‘max_redirects’ => ۲۰
)
)
);
$resultjson = file_get_contents(‘http://fipak.areo.ir/rest/news/bibliographic/listBiblio’,false,$context);
$datajson = json_decode($resultjson,true);
echo ‘
تازه های نشر
‘;
if (is_array($datajson[‘newItemsEntity’])) {
if ( empty($datajson[‘newItemsEntity’][0])) {
echo ‘
“;
}
else {
foreach ($datajson[‘newItemsEntity’] as $keyjson => $valuejson)
{
echo ‘
“;
}
}
}
if ($resultjson === false) {
echo “ziro”;
}
} catch (Exception $ex) {
echo “Exception”;
}
[/insert_php]