Reply to Re: How to asynchrously POST a HTTP request?

Your name:

Reply:


Posted by Benjamin on 12/17/06 03:04

seaside wrote:
> I need to POST a HTTP request from within a PHP app, to inform another
> app regarding certain changes.
>
> Since I don't need to get an answer back, I'd like to fire-and-forget
> the POST request asynchronously.
>
> An option might be to create a new PHP process, forward my data to the
> new instance and continue execution in the main one.
no, you don't need to do this
>
> Are there other options? Options, which don't require to interact with
> the OS directly?
you can use the cURL PHP extension to do this really easily
here's an example:
$curl = curl_init("http://www.mypostapp.com/blah/foo");
curl_setopt(CUROPT_POST, true);
curl_setopt(CUROPT_POSTFIELDS, $mypost);
curl_exec($curl);
curl_close($curl);

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация