cURL, but with no execution delay
Posted: Wed Dec 16, 2009 10:43 am
Hi, I've built a small script for the company I work for which updates a database from a user request. Whenever it is updated I would like to fire a request to a URL (example.org/example.php) informing it of the new database value.
Some caveats:
- These two sites are completely independent, and I do not have access to example.org, so I have to update it via a URL.
- The request needs to send POST data.
None of the above is a problem, but this one is:
- The user should not be delayed if the other server is down/slow.
If I use cURL then is it blocking? I.e. will the execution of PHP be held up whilst it tries to connect to the other server? Ideally I would like to fire the request and not even care if it gets there successfully (kinda the opposite of the TCP IP!) so long as the user who initiated the initial database update doesn't have to wait.
Thanks!
Some caveats:
- These two sites are completely independent, and I do not have access to example.org, so I have to update it via a URL.
- The request needs to send POST data.
None of the above is a problem, but this one is:
- The user should not be delayed if the other server is down/slow.
If I use cURL then is it blocking? I.e. will the execution of PHP be held up whilst it tries to connect to the other server? Ideally I would like to fire the request and not even care if it gets there successfully (kinda the opposite of the TCP IP!) so long as the user who initiated the initial database update doesn't have to wait.
Thanks!