simulate post request after a while

hi there

how can i simulate a post request to a page automatically after x seconds?

thanks in advanced

X seconds after what?

after start action

You want to do it from PHP (server) or JavaScript (user browser).

Just involve javascript to do that. It means after the page has been rendered, you have to set the ajax request, for example, like below:

setInterval(function(){ here goes the ajax request }, 3000);

do in php

users can disable js,

So, in the called action put the method which save a request time into db (or any accessable storage), then check the time by cron. If period between request and your time is as required run another request from CURL.

for that, i have to run cron for exam each 5 seconds and it will make server so busy

the project is a online exam with time limit for each exam section

Then queues. RabbitMQ, ActiveMQ, Redis…