PHP - how to watch for cookie (every second or time interval)? -


i want watch cookie , if cookie exist somethink. tried :

while (true) {     sleep(1);     if ($_cookie['name'])     {         dosomethink();      } } 

but code make execution 'sleep'.

is there way watch without stopping execution?

if browser activity, better way may javascript setinverval() ajax call php function.

otherwise, i'd recommend running php script via cron. there's no other way know run php asynchronously, you're trying accomplish.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -