$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $realhost);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $regstring);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_TIMEOUT,180);
$arg1=curl_exec($ch);
if($queue_debug_mode=="1"){echo "Debug (".curl_error($ch)."): ";print_r(htmlentities($arg1));}
curl_close($ch);
print_r($arg1);输出结果为:
[RESPONSE]
code = 541
description = Command failed
reason = Nameserver requeired.请问怎么把curl_exec的结果转化为array(),我可以这样使用$response["code"]或者$response["description"]