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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -