Solution to ip address blocking during php collection
Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
Recently, many collection programs have been written for various websites. when I picked more than 100 websites, I suddenly found that the website of the other party could not be opened. I guess it must have been blocked by an ip address, if a proxy is used, it will still be blocked. this is not a solution. I did not find any information on the Internet, but I am very sorry. when I was looking for it, someone mentioned the search engine crawler USERAGENT. Even though I only mentioned a little bit, I still thought of listing my solutions,
1. use Snoopy or curl to pass the USERAGENT value of the search engine crawler.
View search engine crawler USERAGENT value: http://www.jb51.net/yunying/29357.html
2. use Snoopy or curl to pass the referer value.
For example, $ snoopy-> referer = 'http: // www.google.com ';
$ Header  = "Referer: http://www.google.com /";
3. use the Snoopy or curl proxy.
For example: $ snoopy-> proxy_host = "22.214.171.124 ";
$ Snoopy-& gt; proxy_port = "3128 ";
4. use Snoopy or curl to prevent IP addresses.
For example, $ snoopy-> rawheaders ['X _ FORWARDED_FOR '] = '2017. 0.0.1 ';
5. use php and a new route program to obtain a new IP address.
6. if you find that the re-routing is still blocked, it is possible that the other party has blocked your mac address. now all routers have forged MAC functions. you can write a program or manually modify the MAC address of the router, there are also tools for modifying the mac address of the NIC.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to email@example.com. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.