show updated results

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shivam0101
Forum Contributor
Posts: 197
Joined: Sat Jun 09, 2007 12:09 am

show updated results

Post by shivam0101 »

Hello,

i need an example where as soon as the server gets updated, the browser should show the updated results, without refreshing. I searched in google, with key words like server push, comet etc without any tutorials.

Thanks
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Search for 'AJAX.'
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

While HTTP Push can, technically be used, it requires the server to manage the tracking. Ajax may be a better option, but it will require Javascript. Although HTTP Push requires support from browsers too.
shivam0101
Forum Contributor
Posts: 197
Joined: Sat Jun 09, 2007 12:09 am

Post by shivam0101 »

ajax examples show past times. Not real time.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

shivam0101 wrote:ajax examples show past times. Not real time.
You shouldn't need to copy an example anyway. AJAX can be updated as often as you tell it to be.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

shivam0101 wrote:ajax examples show past times. Not real time.
Unless you're within, roughly, eyesight of the server, nothing is real-time.
shivam0101
Forum Contributor
Posts: 197
Joined: Sat Jun 09, 2007 12:09 am

Post by shivam0101 »

I downloaded the ajax chat example from the site to solve realtime problem, http://www.zeitoun.net/index.php?2007/0 ... t-with-php and tested, its giving error, stack overflow at line 0. (should i have to download any extra file to make it work?)
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

I wrote:You shouldn't need to copy an example anyway.
If you want something to do what YOU want it to do, write it, don't copy it.
Post Reply