I am trying to get JSON data from the url via curl connection. When I open the link: it shows {"version":"N/A","success":true,"status":true}.
Now, I want to get above content.
So far I have use this:
$loginUrl = 'http://update.protect-website.com/index.php?plugin=firewall&action=getVersion';
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL,$loginUrl);
$result=curl_exec($ch);
curl_close($ch);
var_dump(json_decode($result));
However, I always get NULL, Does someone have idea where is wrong?