|
function ppost( $url , $data , $ref ){ |
|
curl_setopt( $curl , CURLOPT_URL, $url ); |
|
curl_setopt( $curl , CURLOPT_SSL_VERIFYPEER, 0); |
|
curl_setopt( $curl , CURLOPT_SSL_VERIFYHOST, 1); |
|
curl_setopt( $curl , CURLOPT_USERAGENT, $_SERVER [ 'HTTP_USER_AGENT' ]); |
|
curl_setopt( $curl , CURLOPT_FOLLOWLOCATION, 1); |
|
curl_setopt( $curl , CURLOPT_REFERER, $ref ); |
|
curl_setopt( $curl , CURLOPT_POST, 1); |
|
curl_setopt( $curl , CURLOPT_POSTFIELDS, $data ); |
|
curl_setopt( $curl , CURLOPT_COOKIEFILE, $GLOBALS [ 'cookie_file' ]); |
|
curl_setopt( $curl , CURLOPT_COOKIEJAR, $GLOBALS [ 'cookie_file' ]); |
|
curl_setopt( $curl , CURLOPT_HTTPHEADER, array ( 'Accept-Encoding: gzip, deflate' )); |
|
curl_setopt( $curl , CURLOPT_ENCODING, 'gzip,deflate' );这个是解释gzip内容................. |
|
curl_setopt( $curl , CURLOPT_TIMEOUT, 30); |
|
curl_setopt( $curl , CURLOPT_HEADER, 0); |
|
curl_setopt( $curl , CURLOPT_RETURNTRANSFER, 1); |
|
$tmpInfo = curl_exec( $curl ); |
|
echo 'Errno' .curl_error( $curl ); |
|