21,886
社区成员
发帖
与我相关
我的任务
分享
tracert www.baidu.com
Tracing route to www.a.shifen.com [14.215.177.37]
over a maximum of 30 hops:
1 <1 ms <1 ms <1 ms 192.168.5.1
2 19 ms 20 ms 29 ms 100.64.0.1
3 20 ms 20 ms 23 ms 113.98.82.249
4 69 ms 32 ms 23 ms 61.140.98.253
5 24 ms 23 ms 23 ms 113.108.208.42
6 * * * Request timed out.
7 49 ms 25 ms 26 ms 14.29.121.182
8 * * * Request timed out.
9 24 ms 25 ms 24 ms 14.215.177.37
Trace complete.
C:\Documents and Settings\Administrator>
function doCurls($url, $data=array(), $header=array(), $timeout=30){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
$response = curl_exec($ch);
if($error=curl_error($ch)){
die($error);
}
curl_close($ch);
return $response;
}
求解答