[PHP] Looking for Tool to read JSON format

2011-04-01 Thread Michelle Konzack
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

-- 
# Debian GNU/Linux Consultant ##
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsystems@tdnet France EURL   itsystems@tdnet UG (limited liability)
Owner Michelle KonzackOwner Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz Kinzigstraße 17
67100 Strasbourg/France   77694 Kehl/Germany
Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix

http://www.itsystems.tamay-dogan.net/  http://www.flexray4linux.org/
http://www.debian.tamay-dogan.net/ http://www.can4linux.org/

Jabber linux4miche...@jabber.ccc.de

Linux-User #280138 with the Linux Counter, http://counter.li.org/


signature.pgp
Description: Digital signature


Re: [PHP] Looking for Tool to read JSON format

2011-04-01 Thread Simon J Welsh
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



Re: [PHP] Looking for Tool to read JSON format

2011-04-01 Thread Me

http://www.php.net/manual/en/book.json.php

Sent via DROID on Verizon Wireless

-Original message-
From: Simon J Welsh si...@welsh.co.nz
To: Michelle Konzack linux4miche...@tamay-dogan.net
Cc: PHP - General php-general@lists.php.net
Sent: Fri, Apr 1, 2011 21:23:22 GMT+00:00
Subject: Re: [PHP] Looking for Tool to read JSON format

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