Jump to content

php execute something while busy


opencombatclan

Recommended Posts

Hey everyone.

I got another interesting problem.

 

Lets say a client sends a form to the php server, which includes a file.

The php server will be busy for about 30sec, before the upload is complete.

Now here is my idea. On the moment the client submits a file/form, php needs to do something FIRST before it continues to receive and process the browsers headers.

I want it to write something, say "busy" to my mysql database, before continuing with the upload.

 

So here is my idea:

1. Client sends request to php server

2. Php script is called, and writes "busy" to the mysql database

3. It continues to read the browser headers (with the file, which takes 30 secs)

4. It echoes "done" to the browser.

 

Now I really hope that this is possible.

Php only has to do some server side stuff (it does not need the browser headers) before it continues reading the received headers.

Link to comment
Share on other sites

You completely miss the point, i kust need to do as describled in my first post

 

I do not think you can do this with PHP alone, as neil stated you can use Javascript to do this, as it can make a call back when the user presses the submit button, which is what you need. But as far as doing this with just PHP, I do not think it is possible without hacking the core PHP code.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.