php - Aliexpress blocks any request with proxy
问题描述
Recently Aliexpress started to block all requests sent through a proxy.
I tried many ways like:
- CURL
- file_get_contents
- tream_get_contents
But all of them got blocked whenever I add proxy and it works normally when I remove it.
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1");
curl_setopt($ch, CURLOPT_URL, $main_url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FORBID_REUSE , 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_PROXY, "proxy");
I also tried to add all kinds of headers.
How can I prevent Aliexpress from known that this is a proxy curl request?
解决方案
推荐阅读
- powerbi - Multiple measures using the same filter
- r - 有没有办法在 r 的主 x 轴下方添加一个 x 轴?
- iis - How to set IIS url rewrite for http header
- r - 使用 spTransform 将 SpatialPolygonsDataFrame 转换为投影坐标
- nested - ARANGODB AQL MATCHES() with nested objects not possible
- windows - Retrieve Variable from Batch Task and Use It in launch.json in VS Code
- python - Create new array from a defined array
- django - How to create a magnifying glass beside a form field in admin change form to run a script
- r - 将第 N 行的 NA 行插入到 data.frames 列表中,其中 N 来自列表
- javascript - When is require() being executed?