Jump to content

Recommended Posts

the Proxy is a HTTP and it is good i check it?  :confused: Just a white page?!@

 

<?
$url = 'http://www.whatismyip.com/';
$cUrl = curl_init();
curl_setopt($cUrl,CURLOPT_VERBOSE,1);
//curl_setopt($cUrl,CURLOPT_HTTPPROXYTUNNEL,true);
curl_setopt($cUrl,CURLOPT_PROXYTYPE,CURLPROXY_HTTP);
curl_setopt($cUrl,CURLOPT_PROXY,'68.32.66.6:9090');
curl_setopt($cUrl,CURLOPT_SSL_VERIFYPEER,false);
curl_setopt($cUrl,CURLOPT_URL,$url);
curl_setopt($cUrl,CURLOPT_TIMEOUT,320);
$PageContent = curl_exec($cUrl);

curl_close($cUrl);
echo $PageContent;

?>

Link to comment
https://forums.phpfreaks.com/topic/184748-curl-proxy-wont-work-white-page/
Share on other sites

if u give a resturntransfer then it will show you a exact blank page with out any result, so dont go for it.. :anim_reading:

 

$PageContent = curl_exec($cUrl);

curl_close($cUrl);
echo $PageContent;

 

He's storing the return of curl_exec() within the "$PageContent" var, then echoing it out. With RETURNTRANSFER set to true it wouldn't matter because he's echoing the var, with it set to false it also wouldn't matter because the content would be outputted directly by curl_exec().

if u give a resturntransfer then it will show you a exact blank page with out any result, so dont go for it.. :anim_reading:

 

$PageContent = curl_exec($cUrl);

curl_close($cUrl);
echo $PageContent;

 

He's storing the return of curl_exec() within the "$PageContent" var, then echoing it out. With RETURNTRANSFER set to true it wouldn't matter because he's echoing the var, with it set to false it also wouldn't matter because the content would be outputted directly by curl_exec().

 

if u place the

curl_setopt($cUrl,CURLOPT_RETURNTRANSFER,1);

before the

curl_setopt($cUrl,CURLOPT_URL,$url);

 

then it will provide u with the blank page..

if u put it afterwards then it will display a page with the result..

:P

if u place the

curl_setopt($cUrl,CURLOPT_RETURNTRANSFER,1);

before the

curl_setopt($cUrl,CURLOPT_URL,$url);

 

then it will provide u with the blank page..

if u put it afterwards then it will display a page with the result..

:P

 

Mmm, not for me it doesn't? Do you have a link or anything that states this?

nope it should be

<?
$url = 'http://www.whatismyip.com/';
$cUrl = curl_init();
curl_setopt($cUrl,CURLOPT_VERBOSE,1);
//curl_setopt($cUrl,CURLOPT_HTTPPROXYTUNNEL,true);
curl_setopt($cUrl,CURLOPT_PROXYTYPE,CURLPROXY_HTTP);
curl_setopt($cUrl,CURLOPT_PROXY,'68.32.66.6:9090');
curl_setopt($cUrl,CURLOPT_SSL_VERIFYPEER,false);
curl_setopt($cUrl,CURLOPT_URL,$url);
curl_setopt($cUrl,CURLOPT_TIMEOUT,320);
curl_setopt($cUrl,CURLOPT_RETURNTRANSFER,1);
$PageContent = curl_exec($cUrl);

curl_close($cUrl);
echo $PageContent;

?>

Hey thanks! but still cant get it to work.. Could the white page be a time out??

 

Im on godaddy shared hosting,

 

If i use a GoDADDY proxy server like this

 

curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);

curl_setopt ($ch, CURLOPT_PROXY,"http://64.202.165.130:3128");

 

It works. but i cant use any other proxies ? :(

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.