I have been able to parse actual .json files, but this link I can't seem to parse.
http://forecast.weather.gov/MapClick.php?lat=36.321903791028205&lon=-96.80576767853478&FcstType=json
I am thinking because the link itself is not a .json file but a json formatted link... and I am having issues trying to parse it... even if I start by using...
<?php
$url = "http://forecast.weather.gov/MapClick.php?lat=36.321903791028205&lon=-96.80576767853478&FcstType=json";
$json = file_get_contents($url);
$json_a = json_decode($json,true);
// <---------- Current Conditions ----------> //
//Display Location
$location_full = $json_a['location']['areaDescription'];
?>
And the on my page I want to display this information I have:
<?php
require 'req/weatherinfo.php';
?>
<!DOCTYPE html>
<html>
<head>
<title>PawneeTV Weather</title>
</head>
<body>
<?php echo $location_full; ?><p>
</body>
</html>
Any ideas why its generating a blank page? I have cleared the errors now it just doesn't display anything. I've done with many times with a .json file source, it works with this source http://api.wunderground.com/api/43279e1c0b065c2e/forecast/q/OK/Pawnee.json, but will not work with a link thats ends with =json instead of .json