Re: Multithreading in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

on 03/17/2009 10:14 AM Manoj Singh said the following:
> I am creating a page which submits the form through Ajax request & the
> submitted page is sending the mails to n number of users. Now until the mail
> sends or the page process completed the end user has to wait.
> 
> Is it possible that server sends the response to the client & then start
> processing so that the client doesn't have to wait for the server response.

You will need to use AJAX/COMET requests. Regular XMLHttpRequest AJAX
requests will not do because when you send the AJAX response your script
 exits.

With AJAX/COMET requests you can send several responses to the same
request without exiting the script, so you can show progress report.

Take a look at these articles:

http://www.phpclasses.org/blog/post/58-Responsive-AJAX-applications-with-COMET.html

http://www.phpclasses.org/blog/post/51-PHPClasses-20-Beta-AJAX-XMLHttpRequest-x-IFrame.html


This forms class comes with an AJAX/COMET plug-in that allows you to
show progress of a task running on the server without page reloading in
a single request.

http://www.phpclasses.org/formsgeneration

Here is is a live example script that show progress of a task running on
the server after the form is submitted.

http://www.meta-language.net/forms-examples.html?example=test_ajax_form


-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux