Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

PHP Accessing Censored Websites with Curl

I want to access censored web sites with curl I setup the proxy and tested it. It works. But it's not enter the censored websites.

It's entering https sites.

<code>

$ch = curl_init();
//curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5');
curl_setopt($ch,CURLOPT_USERAGENT,"Mozilla/5.0 (compatible; Santa1923/bot)");
curl_setopt ($ch, CURLOPT_HEADER, false);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 2);

curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt ($ch, CURLOPT_TIMEOUT, 30);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 30);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);

curl_setopt($ch, CURLOPT_PROXY, '192.241.129.11');
curl_setopt($ch, CURLOPT_PROXYPORT, '8118');
curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP');


$url = 'https://www.wikipedia.com';
//$url = 'Google';


curl_setopt($ch, CURLOPT_URL, $url);

$data = curl_exec($ch);

echo $data;

</code>
What do you mean with "censored" websites? Cloudflare protected?
(Jun 26, 2019 01:21 PM)Kallu609 Wrote:  What do you mean with "censored" websites? Cloudflare protected?

I'm assuming he means websites that's blocked by the government or ISP.
(Jun 26, 2019 06:33 PM)biscuit deluxe Wrote:  I'm assuming he means websites that's blocked by the government or ISP.

In that case he could setup forward proxy on some server and fetch the data through that. Maybe even something simple like a VPN would work too.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by barimoAug 6, 2021 01:01 AM 4 213 Aug 6, 2021 01:01 AM
Last Post: barimo
[PHP] by Programmer00Jan 30, 2020 05:57 AM 1 151 Jan 30, 2020 05:57 AM
Last Post: Charger
[PHP] by redmoon90211Jan 16, 2020 11:42 AM 11 279 Jan 16, 2020 11:42 AM
Last Post: Charger