johnsmith153 Posted October 25, 2008 Share Posted October 25, 2008 How would I change this, so cURL sends/can use the current $_SESSION values? (by default the code I have posted here - the page cURL accesses wont be able to access $_SESSION values.) Something to do with sending the cookies. I have tried, and people have posted links. So, call it lazy of me if you want, but I would just appreciate an answer "change this to this" - then call me lazy. Thanks. $post_fields="var1=1&var2=5&var3="; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://www.site.com/page.php'); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, $post_fields); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response_string = curl_exec($ch); curl_close($ch); Link to comment https://forums.phpfreaks.com/topic/130067-simple-changes-to-code-needed-please/ Share on other sites More sharing options...
kenrbnsn Posted October 25, 2008 Share Posted October 25, 2008 This is the third thread you've started on this same subject. I'm locking this one. Ken Link to comment https://forums.phpfreaks.com/topic/130067-simple-changes-to-code-needed-please/#findComment-674405 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.