Re: Automatic Change without reload button

From: Date: Sat, 16 Sep 2000 02:31:59 +0000
Subject: Re: Automatic Change without reload button
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-17004@lists.php.net to get a copy of this message
On Sat, 16 Sep 2000, Pepen wrote: > Hi Everyone, > > how to make a page that view data from MySql table that the data > is automatic change if the the content of table was change, without > press the reload button in browser > > Thank's > Pepen Well, the base answer is, "You can't do that." Not entirely true, of course. When a person goes to your web site, each interaction is separate. There is no permanent TCP/IP connection. So you don't have a way to send another page to them until they request it. Now, what you could do, is have your page send a Java program to the remote site. This Java program would then open a socket to a server at your site. When your server tells the Java program that the database has been updated, the Java program on the client would then request the data and display it. This would really be more or less independant of your Web page and their browser. The other thing you might be able to do is have a small Java or JavaScript program which would do an automatic refresh from the client side. But there is NO way for the Web server to contact the client's browser except when the client requests it. John P.S. no, I don't know how to write such a client-side requestor, sorry.

« previous php.general (#17004) next »