Answer the question
In order to leave comments, you need to log in
How to use proxy for Xpath + php parser?
Hello!
I wrote a php parser using Xpath and curl.
Everything was going well until I was banned by the right site, missing only one request. As a result, now I put the script on cron with every minute launch
. Please tell me how to use a proxy to get around this problem.
Thank you!
Answer the question
In order to leave comments, you need to log in
It is enough to look in the manual for all the parameters with the text PROXY .
For an HTTP proxy, this setting is enough:
curl_setopt($connection, CURLOPT_HTTPPROXYTUNNEL, false);
curl_setopt($connection, CURLOPT_PROXY, '66.96.200.39:80');
curl_setopt($connection, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question