rikker Posted April 22, 2007 Share Posted April 22, 2007 Is there a way to use CURL to post form data to another site and make the URL change from the current php script to the url of the site that I curl to? Right now when i test this the URL remains as the name of mu script ... ie> www.mysite.com/curl.php instead of changing to the address I am doing the curl to. I tried setting this variable curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); but it only changes to the new sites URL when I click a link on that site. I want it to show the new site address right away. Link to comment https://forums.phpfreaks.com/topic/48133-curl-question/ Share on other sites More sharing options...
jchemie Posted April 22, 2007 Share Posted April 22, 2007 Well in this case you may use header("location:$new_site_addr"); ?? Link to comment https://forums.phpfreaks.com/topic/48133-curl-question/#findComment-235249 Share on other sites More sharing options...
rikker Posted April 22, 2007 Author Share Posted April 22, 2007 but wouldn't using a header redirect after my curl just reload the page to the URL i want however lose all the form POST data? Link to comment https://forums.phpfreaks.com/topic/48133-curl-question/#findComment-235261 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.