PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
tags when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
I have a curl script on page 1 that will post some values to page 2. Currently when page 1 performs the post using curl, page 1 stays waiting for a response from page 2. I don't want page 1 to sit idly by until page 2 returns something. I want page 1 to do the post with curl and continue executing any code left on that page. In other words, i want this post to be asynchronous. Below I have posted my script for the curl post. Any help will be greatly appreciated.
I see what you mean about the CURLOPT_TIMEOUT. Sometimes the best answers are the simplest ones. I'll have to test that later on today and hopefully it will work. I'll inform you after I test. And I apologize for forgetting the
if you don't want it to wait at all, you could potentially either wait until the end of the script to tell it to execute, or use [php_man]fsockopen[/php_man]() to create the request, but not read the details.. maybe.. although I'm not sure if fsockopen would wait for a response or not..
I changed the CURLOPT_TIMEOUT to 1 second and now it works beautifully. It waits 1 second for a response and then it continues. It works great since i don't really care what page 2 returns. Thanks for your help.