faqts : Computers : Programming : Languages : PHP : Common Problems : Code Execution

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

17 of 32 people (53%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

Is it possible to PUSH content through PHP3 like the server time every second?

May 16th, 2000 08:08
Matt Gregory, Chris Schmidt, Nathan Wallace,


Yes and No.
Using PHP alone, this is not possible.  PHP is run when a file with an 
associated extention is called.  For this reason it is impossible to 
have Server events triger PHP.  You could do one of two things to make 
this happen however:
 1.) Create a server-side module (Apache & IIS) or a Service (NT) to 
call your script on a timed basis or...
 2.) Have a webpage refresh every X seconds thereby calling the 
generating script.