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?