FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How to post data without waiting for the response
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How to post data without waiting for the response [message #170344 is a reply to message #170343] Fri, 29 October 2010 18:23 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
Magno wrote:
> On 10/29/2010 02:30 PM, The Natural Philosopher wrote:
>> bingomanatee wrote:
>>> I have a lot of data to transmit - a lot of multi-K files that I want
>>> to send to a web service. I want to do so WITHOUT waiting for the
>>> response. BTW using a simple url, sending a raw body POST.
>>>
>>> What is the best way to send the files that is no blocking (because
>>> not dependent on feedback from the recipient)?
>>>
>>> Recommendations?
>>
>> I dont really understand what you are trying to do here.
>>
>> Where is the PHP involved? On the web service server?
>>
>>
>> PHP is not an environment that lends itself to background data
>> transmission.
>
> I think the OP could be wanting to send info or files from within PHP to
> another server through something like CURL?
>
> If this is the case... I think the best approach would be to launch
> another process to do this, with exec() for example.

If that is the case, then I totally agree.

Could easily exec a background process to fork, handle the data
transfer, and exit when done, silently.

Of course it wouldn't give any guarantee that te data WAS sent.

Or you could write a daemon, that simply looked in a temporary
directory, and uploaded any files it found there.

Or a process run under cron.

That might be more reliable in fact,. because a failed transfer could be
repeated.

It's pretty much the way e.g. sendmail works.

In fact you could probably use a mail system to do it: write a custom
delivery agent and email the files..the delivery agent is invoked if a
special mail address is noted, and does the dirty work. I used to know
how to make sendmail do that.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Displaying RSS Feeds With Javascript2 ...
Next Topic: linking between 2 databases (on different servers)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 04:19:14 GMT 2024

Total time taken to generate the page: 0.04115 seconds