I want the data sent by my clients (via post) to be placed in a queue and a php script on my server first checks if the queue is empty. If the queue is not empty, then the s
You could use something like Zero MQ
See Example by Rasmus Lerdorf.
You could also consider using Gearman to distribute the load.