2

I want to read data from a website but blacked my real IP address
I want to use IP list to read data :

proxy list 1
proxy list 2

I am test this way to hide my real IP address and my IP address not exists in header but target website find my real IP adrress and block it

I am using php with curl
And my target website written by python

Please help me

Community
  • 1
  • 1
Fadakar
  • 509
  • 1
  • 5
  • 21

1 Answers1

5

Try the following code to visit your target site:

$url = 'http://example.com';
$proxy = '127.0.0.1:8080';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
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;
Flexo
  • 87,323
  • 22
  • 191
  • 272
cmeadows
  • 185
  • 2
  • 12