Re: PHP cURL to achieve simulation login and collection method of use
recently studied an automatic analog logon class, please see "PHP based on cURL implementation automatic simulation login" understanding. (supplemented by 2016.7.31)
>! -- m -->http://www.zjmainstay.cn/php-curl-auto-login
five, compressed page collection / > some friends who have not touched the compressed page are expected to be killed here. Because they will find the content of the collection is a random code, and no matter the use of iconv or powerful mb_convert_encoding can not restore the data, and then there is no concept, all kinds of crazy but can not find the way, ha ha, I used to be the same ~
(five) is a messy code expression:
cURL random code to solve
, for example, when collecting the news of the Sohu, there is a gzip compression problem. The following is an example:
[code] $url ='http://news.sohu.com/';
$ch = curl_init ($url); / / / / / / / / return data does not output direct output / > CURLOPT_ENCODING,