Php obtains the json data of the url and returns a null value.

Source: Internet
Author: User
Php gets json data via url and returns a null http://php.net/api/apply.php? & Amp; apply = {& quot; apply & quot;: {& quot; name & quot;: & quot; 4747474 & quot;, & quot; site & quot ;: & quot; ht php retrieves json data through the url and returns a null value
Http://php.net/api/apply.php? & Apply = {"apply": {"name": "4747474", "site": "http: \/4444444444444444", "icon": "47 ", "information": "474", "about": "747", "weibo": "74444444444", "email": "74444444444444444", "moblie": "89742589633 ", "isfree": "y", "applytime": 1349939108 }}

This is a link. how can I extract the json format on this page?

------ Solution --------------------
$ X = json_decode ($ _ GET ['application']);
------ Solution --------------------
Var_dump (json_decode ($ _ GET ['application'], true ));
What is the metric?
------ Solution --------------------
Var_dump (json_decode (urldecode ($ _ GET ['application']), true ));
------ Solution --------------------
PHP code
Print_r (json_decode ('{"apply": {"name": "4747474", "site": "http: \ // 4444444444444444", "icon ": "47", "information": "474", "about": "747", "weibo": "74444444444", "email": "74444444444444444", "moblie ": "89742589633", "isfree": "y", "applytime": 1349939108 }}'));
------ Solution --------------------
The parameter "apply" in the LZ address is preceded by an ampersand (&). do you think this is the problem?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.