944,148 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2595
  • PHP RSS
Jan 20th, 2005
0

PHP - Half the way response and continue PDF processing

Expand Post »
Hi All

I have the following requirement to be implemented in PHP & My SQL database with Apache Server.

I have to write a PHP which will get a HTTP request from Client and immediately respond back with a Token # (Random number). Once the Token number has been sent back to Client, PHP should continue processing on the Server side as follows. (back end processing after response)

1) Fire some SQL queries to My SQL
2) Create a PDF with the output
3) Create a directory with Token # and store the PDF.

Client will download the PDF with the URL after some time.

Is there any way of implementing asynchronous handling in PHP i.e send token # half the way and continue generating & storing PDF on the server?

Any pointers will be of great help.

Thanks in advance
Praveen
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pepsoft239 is offline Offline
5 posts
since Jan 2005
Feb 24th, 2005
0

Re: PHP - Half the way response and continue PDF processing

Here's how we've done it b4:

Response script:
[PHP]
<?php
exec ( "php -q $processing_script $argument_1 </dev/null &>/dev/null &" );
echo "response";
?>[/PHP]
Processing script:
[PHP]
<?php
$argument_1 = $_SERVER [ 'argv' ][ 1 ];
do_it ( );
?>[/PHP]
Reputation Points: 10
Solved Threads: 0
Newbie Poster
zobier is offline Offline
1 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Can't get PHP to run ! Please help!
Next Thread in PHP Forum Timeline: PHP Editor beta: please take a look





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC