Php cURL Queries

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ajrs4god
Forum Newbie
Posts: 1
Joined: Thu Jun 23, 2011 6:10 am

Php cURL Queries

Post 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
User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

Re: Php cURL Queries

Post 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)
Post Reply