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

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

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -

asp.net - call stack missing info on mono with apache and mod_mono -