Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh page frm server

Status
Not open for further replies.

ca4928

Programmer
Jan 4, 2005
13
GB
I am trying to build a website where two people can talk to each other. I am using AJAX, PHP and MySQL. What I would like is that, when one person submits a message to the server, the other person sees the message.

In effect I would like to send information to the client without the client reqesting it. Is there any way to do this?

I suppose it would be possible to send an XML-HTTP request to a php page that loops until a value is added to the database, but I am not sure whether this is kind on the server.

Any ideas?
 
You might set up the AJAX to request every half second or so to see if any information has changed...and simply return 1 or 0 as a response...this is so little information that the user would probably not notice the traffic load.

***************************************
J. Jacobs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top