Mon. Aug 26th, 2019

Codes

Codes for Coders

PHP add proxy in curl request by Rishap Gandhi

1 min read
PHP Proxy Bypass by Rishap Gandhi

PHP Proxy Bypass by Rishap Gandhi

PHP Proxy Bypass by Rishap Gandhi
PHP Proxy Bypass by Rishap Gandhi

Today in this blog I will tell you how to open website by curl using proxy so that you can open banned websites.

Many people face website blocked on the IP but from simple PHP CURL code you can open any website

 

<?php
$url = "http://www.google.com"; //Website URL which you want to open
$proxy = "127.0.0.1:25"; //Proxy IP : Port Number
$proxyauth = 'user:password'; //If proxy required user id and password else comment it
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyauth); // If proxy required user id and password else comment it
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;
?>

You can download the sample from here :

Download Code by Rishap GandhiCompress and Resize of Image in PHP by Rishap Gandhi

PHP add proxy in curl request

13 thoughts on “PHP add proxy in curl request by Rishap Gandhi

  1. You actually make it seem so easy with your presentation but I find this matter to be actually something that I think I would never understand. It seems too complicated and very broad for me. I am looking forward for your next post, I will try to get the hang of it!

  2. Thanks for any other wonderful article. Where else may just anyone get that kind of info in such a perfect way of writing? I have a presentation subsequent week, and I am at the look for such information.

Leave a Reply

Your email address will not be published. Required fields are marked *