php - How to load externally hosted data in JSON format -
what syntax pull external data source, has data in json format variable worked with. understand using json_decode($variable) how load actual data variable decoding?
if external mean it's hosted on 3rd-party domain name, open socket , data:
$variable = file_get_contents('http://example.com/data.json'); $decoded = json_decode($variable);
Comments
Post a Comment