cURL crawling page simple web crawler
Simple use of cURL
<?php $curl=curl_init("http://www.baidu.com"); //创建curl资源 curl_exec($curl); //传递给浏览器 curl_close($curl); //关闭curl释放资源 ?>
Create a new php file and write it to the file.
Open cmd and enter the web directory.
Then you can use dir to view the folder contents
Select the edited php file
Then export
In the folder we can see baidu.html
The page that opens is as follows. This is our simplest crawler.