Created
September 22, 2011 02:36
-
-
Save davidvanvickle/1233897 to your computer and use it in GitHub Desktop.
php curl get json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ch = curl_init('http://domain.com?'.http_build_query(array('type'=>'stuffIndex','request'=>'getIt'))); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
$resp = curl_exec($ch); | |
curl_close($ch); | |
$d = json_decode($resp,true); | |
if ($d && isset($d['akey'])) { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi @davidvanvickle, iam trying to get json from this kind of URL http://myip:7557/devices/?query=%7B%22InternetGatewayDevice.DeviceInfo.IMSI%22%3A%22541070000000142%22%7D
but there is no results..