Page 1 of 1

Php cURL Queries

Posted: Thu Jun 23, 2011 6:16 am
by ajrs4god
i have a silly problem.. i have this code

Code: Select all

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $finalURL);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result =  curl_exec($ch);
curl_close($ch);
everything works except the fact that the

Code: Select all

 $result 
when echoed has True + URL but they are concatenated which sucks because
i dont know where the True is coming from and i cant use a header redirection when True is in front of the URL. i know i could remove the true from front but
that is a hack there has to be a reason why i am getting this value instead of the desired one. Can anyone helpppp?? THANKYOU

Re: Php cURL Queries

Posted: Thu Jun 23, 2011 11:57 am
by twinedev
What is the value of $finalURL ? Or can you post what you get when you manually go to it? (preferably giving the raw result shown via output from a program like fiddler or at the least the output from VIEW SOURCE of visiting the page)