0

A few years ago i made am webbapp with ajax and php, i really loved the polling mechanism. Now i`m working on a streamingserver which is controlled by php. The client makes a call to the php to start en stop streaming. These are calls the clients initialises, now i want to do some "server-maintenace". (which is not initialized by a client)

What i'm trying to do is creating a script thats check for clients, the script needs to loop and query`s the database for the clients table every 20 seconds, is this possible with using PHP only? can you give me some tricks and tips?

help is appreciated

1 Answer 1

1

If you want it to be under a minute you'll need a long running PHP process. If you can live w/ every minute, a cron job will suffice. Another option would be to run the check as part of requests as they came into the webserver for other things as part of your application.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.