verdigim sekilde calisiyor bu arada.
hocam deniyorum echo print_r($json_data) dersem ekrana 1 yazıyor print_r($json_data) dersem hiç birşey yazmıyor boş ekran geliyor
<?php
$url = "https://www.birebin.com/api/game-program/GetBulletin";
$json = getir($url);
$json_data = json_decode($json,true);
print_r($json_data);
function getir($url){
$ch = curl_init();
$user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6';
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
curl_setopt($ch, CURLOPT_ENCODING, '');
curl_setopt($ch,CURLOPT_USERAGENT,$user_agent);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
?>