Extract Data from a Website using PHP

Posted by 01jayss on Stack Overflow See other posts from Stack Overflow or by 01jayss
Published on 2011-02-28T23:19:58Z Indexed on 2011/02/28 23:25 UTC
Read the original article Hit count: 184

Filed under:
|
|

I am trying to get PHP to extract the TOKEN (the uppercase one), USERID (uppercase), and the USER NAME (uppercase) from a web page with the following text.

{"rsp":{"stat":"ok","auth":{"token":"**TOKEN**","perms":"read","user":{"id":"**USERID**","username":"**USER NAME**","fullname":"**NAME OF USER**"}}}}

(This is from the RTM api, getting the authentication token of the user).

How would I go about doing this? Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about screen-scraping