moon 111 Posted September 29, 2008 Share Posted September 29, 2008 I'm trying to send POST requests to a form that requires the user to be logged in. How could I do this? My current code (until it hit me that I need to be logged in): <?php $ch = curl_init(); $data = array('name' => 'Foo', 'test' => 'aig'); curl_setopt($ch, CURLOPT_URL, 'http://www.kingdavidwebdesign.com/post.php'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); for($i = 1; $i <= 5; $i++) { curl_exec($ch); } ?> All help would be GREATLY appreciated. Thanks, - Moshe Link to comment https://forums.phpfreaks.com/topic/126251-posting-to-forms-with-curl/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.