首页 > 解决方案 > Aliexpress blocks any request with proxy

问题描述

Recently Aliexpress started to block all requests sent through a proxy.

I tried many ways like:

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?

标签: phpcurl

解决方案


推荐阅读