日期:2014-05-16 浏览次数:20529 次
{
"dataList": [
{
"Subject": "这里是标题",
"Distance": "距离",
"Address": "山东省青岛市"
},
{
"Subject": "这里是标题",
"Distance": "距离",
"Address": "山东省青岛市"
}
]
}
<?php
url = 'http://www.123.com/query_json.php?action=ceshi&x=1';
$response = ihttp_get($url); //ihttp_get是一个封装的函数,提交url的,没有任何问题
$content = $response['content'];
$d = json_decode($content, true);
$traces = $traces['dataList'];
foreach($traces as $trace) {
$reply .= "{$trace['Subject']} - {$trace['Address']}\n";
}
return $this->respText($reply);
}
return $this->respText($text);
?>