PHP Crawler: Millions do not know user data crawl and analysis
Code Escrow Address: Https://http://www.php.cn/hhqcontinue/zhihuSpider
Wen/hector
This time, it grabbed 110.
User data, the results of the data analysis are as follows:
Pre-development preparation
Install a Linux system (Ubuntu14.04) and install an Ubuntu under VMware virtual machines;
Install the PHP5.6 or above version;
Install curl, Pcntl extension.
Crawl page data using PHP's Curl extension
PHP's Curl extension is a library supported by PHP that allows you to connect and communicate with various servers using various types of protocols.
This procedure is to crawl the user data, to be able to access the user's personal page, users need to log in to access. When we click on a user's avatar link in the browser page to enter the user's Personal center page, we can see the user's information, because when the link is clicked, the browser helps you to bring the local cookie to the new page, so you can go to the user's Personal center page. So before you can access your personal page, you need to obtain the user's cookie information and then