Hi all, I'm trying to use the curl library to request a page through POST. The page is requested fine, the parameters are passed but the url that is shown in the browser is the url of the previous page, the page that is making the request and not the page that is shown in the redirection. ie: $ch= curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.foo.com"); $arg= Array(); $arg['desc']='something here'; $arg['cartId']='more here'; $arg['submit']="Yes, I want to pay"; $header[]="Location: https://www.foo.com"; curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $arg); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt ($ch, CURLOPT_HTTPHEADER, $header); curl_exec ($ch); curl_close ($ch);
the "https://www.foo.com" is requested fine, the parameters are passed alright but the browswer shows the address of the previous page so the lock image of the secure connection isn't shown on the status bar, not to mention all the relative uri now point to the domain of the script that made the request and not to the new page's domain, so it's a mess. thanks a lot for looking at this! Lizet -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php