摘要:
现在很多网页都是GZIP压缩的,如果用PHP取过来发现是一堆乱码,可以用GZIP函数类解压,但有时候PHP编译没编译GZIP可用下面函数代替:<?phpif (!function_exists ( 'gzdecode' )) { function gzdecode($data){ $flags = ord ( substr ( $data, 3, 1 ) ); $headerlen = 10; $extralen = 0; $filenamelen = 0; if ($flags & 4) { $extralen = unpack ( 'v', s 阅读全文
posted @ 2010-09-08 16:26
liushan
阅读(1249)
评论(2)
推荐(0)
摘要:
做KU6的API的时候报这个错误,网上找了阵子才找到答案,原来是返回时候超时,Operation timed out after 1000 milliseconds with0 bytes received 如果使用curl的话设置curl_setopt_array($remote, array(CURLOPT_TIMEOUT=>200))根据需要修改时间,大到一定程度还超,检查网络,呵呵~ 阅读全文
posted @ 2010-09-08 10:14
liushan
阅读(2492)
评论(0)
推荐(0)


浙公网安备 33010602011771号