php curl使用

$cu = curl_init();

curl_setopt($cu, CURLOPT_RETURNTRANSFER, true);

curl_setopt($cu, CURLOPT_TIMEOUT, 5);

curl_setopt($cu, CURLOPT_URL, '****');

$c = curl_exec($cu);

$info = curl_getinfo($cu);

print $info['http_code'];


http://www.educity.cn/develop/685399.html

你可能感兴趣的:(PHP,curl用法)