Home > Article > Backend Development > How to clone an entire PHP website
This article introduces curlMulti, a cloning tool. With this tool, non-technical people can quickly clone the entire site.
Tool link:https://github.com/ares333/php-curl
Tool features:
1. Capture various resources of the website html\Css\Js\RAR compressed files, etc.
2. Parallel crawling, the crawling speed is amazing
Operation process:
This article uses mac for explanation.
##2. Preparation
Under normal circumstances, changing the URL will be ok. If the site to be cloned is very large, you need to add code in the first line:ini_set('memory_limit', '2048M');
3. Execute cloning
php site_clone1.phpAt this point, cloning has started . Remember, do not close the terminal window. (If you want to continue cloning after closing the window, please contact me) If the website you want to clone is relatively small, such as a novel site, it can be done in half an hour (clone 100 pages per second without any pressure)
4. Website storage directory
##Double-click index. html can open the cloned website.
Attachment: If you want faster cloning, do the following:
如果要测试500并发,那需要在终端多执行一行命令: 以上内容仅供参考! 推荐视频教程:PHP视频教程ulimit -n 1000
The above is the detailed content of How to clone an entire PHP website. For more information, please follow other related articles on the PHP Chinese website!