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

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -