Jump to content

Issue with cURL.


Evank_Horizon

Recommended Posts

Here's the code I'm working on. Once I make it work, it should send all new content of my site to a PHP interface which will scan the new content. Only problem is CURLOPT_POSTFIELDS doesn't over write the earlier one. And all that must be send in the same sessions for it to work. Please help.

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERPWD, "***:***");
curl_exec($ch); //connects to the site and logs in
curl_setopt($ch, CURLOPT_POSTFIELDS, $post1); 
curl_exec($ch); // sends a first set of POST data
curl_setopt($ch, CURLOPT_POSTFIELDS, $post2);
curl_exec($ch); // should send a second set of POST data... but doesn't.
curl_close($ch);

Link to comment
https://forums.phpfreaks.com/topic/161079-issue-with-curl/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.