$v) { $url = "http://cha.hxsec.com/ajax.php?act=select"; $postdata['table'] = $v; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); // 设置链接 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // 设置是否返回信息 curl_setopt($ch, CURLOPT_POST, 1); // 设置为POST方式 curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata); $response = curl_exec($ch); // 接收返回信息 if ($response && $response != "" && $response != 'key length!!!') { $str = (str_replace(array( "addRow", '(', ')', ";" ), array( "", "[", "]", "" ), $response)); $t = json_decode($str, true); if ($t) $data[] = $t; } } $d['data1']=$data; $url="http://www.fangzhuangku.com/function/pwdsearch.php"; $ch = curl_init(); $postdata['q']=$_GET['q']; curl_setopt($ch, CURLOPT_URL, $url); // 设置链接 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // 设置是否返回信息 curl_setopt($ch, CURLOPT_POST, 1); // 设置为POST方式 curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata); $response = curl_exec($ch); // 接收返回信息 $d['data2']=json_decode($response,true); echo json_encode($d);