On 2/04/2011, at 10:19 AM, Michelle Konzack wrote:

> Hello *,
> 
> curently I am coding on my new Intranet Interface, but  some  teleguided
> servers return only JSON or YAML files.
> 
> Can someone tell me, how to import JSON files in PHP 5/6?
> 
> Thanks, Greetings and nice Day/Evening
>    Michelle Konzack

json_decode(file_get_contents('http://domain/file.json'));

If you need to do a POST rather than a GET, use curl and pass the output from 
curl_exec() to json_decode().

---
Simon Welsh
Admin of http://simon.geek.nz/

Who said Microsoft never created a bug-free program? The blue screen never, 
ever crashes!

http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to