
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.
1.Download tool

##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');
Copy after login
3. Execute cloning
1. Open the terminal


Perform the following operations in the terminal:
Right-click the site_clone1.php file, "Show Introduction" , select the text as shown in the figure, copy

Input in the terminal: "cd ", then Ctrl v to paste the content you just copied, and press Enter (enter the characters without double quotes)
My terminal looks like this, it can be used as a reference:

Enter in the terminal:
php site_clone1.php
Copy after login
At 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并发,那需要在终端多执行一行命令:
ulimit -n 1000
Copy after login
以上内容仅供参考!
推荐视频教程:PHP视频教程
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!