-1

I have this issue where I'm going to need to change my IP every 200 cURL requests - so obviously proxies come to mind. The issue is I'm wondering how I where I would find these proxies. Any solutions? Thanks!

UPDATE: Okay, so for future visitors of this site, if you'd like to use cURL through a random proxy, here's how you'd do it: 1) You'd have to scrape a random proxy off of a proxy site (take this one for example: http://www.hidemyass.com/proxy-list/10) ...save proxy to variable 2) you'd then connect to the site with the proxy using this code:

$url = 'URL Here';
$proxy = 'SCRAPED  PROXY HERE';
//$proxyauth = 'user:password';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
//curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyauth);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
$curl_scraped_page = curl_exec($ch);
curl_close($ch);

echo $curl_scraped_page;
Grant
  • 229
  • 5
  • 13

1 Answers1

0

Okay, so for future visitors of this site, if you'd like to use cURL through a random proxy, here's how you'd do it: 1) You'd have to scrape a random proxy off of a proxy site (take this one for example: http://www.hidemyass.com/proxy-list/10) ...save proxy to variable 2) you'd then connect to the site with the proxy using this code:

$url = 'URL Here';
$proxy = 'SCRAPED  PROXY HERE';
//$proxyauth = 'user:password';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
//curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyauth);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
$curl_scraped_page = curl_exec($ch);
curl_close($ch);

echo $curl_scraped_page;
Grant
  • 229
  • 5
  • 13
  • No need to scrape, TheProxIsRight (theproxisright.com/help) has a free API for presently active proxies. JSON/CSV/XML/Text output, can query by country, high availability, low latency, type, anonymity, browser and google support, etc. – sobelito Nov 13 '14 at 13:45