...

View Full Version : Connection B/W 2 browsers



adarshakb
10-22-2009, 06:09 PM
Guys help me in pointing what to learn to have a connection b/w two players... playing on 2 different browsers a game say chess and interlink their display of chess board so that it reflects in realtime the changes made.
Assume that i have all the codes for the game. But i want to transmit data without the user needing to refresh again and again for latest moves. I u get the point...
like wise what to learn to provide a chat option their.. it too involves realtime update as above so i guess for both i goto learn the same

Thanks to all replies :)

Fumigator
10-22-2009, 06:24 PM
Start with a web server and go from there.

adarshakb
10-22-2009, 06:34 PM
Start with a web server and go from there.
Yep started with PhP.Can some one tell m the way it would theoratically work.. like only the linking part.. and can it be done using PhP ONLY or i need any other skills

oesxyl
10-22-2009, 06:41 PM
Yep started with PhP.Can some one tell m the way it would theoratically work.. like only the linking part.. and can it be done using PhP ONLY or i need any other skills
javascript, more exactly you can do this using ajax and/or json. Usualy you also need to know many other things more or less.

best regards

CFMaBiSmAd
10-22-2009, 06:48 PM
Browsers, no matter how hard you try, can only function as the client in a HTTP request/response client-server arrangement - http://en.wikipedia.org/wiki/HTTP

You need to cause the client (browser) to make periodic http requests to the server in order to get the current information. If you use AJAX, you can then update the information on the page without refreshing the whole page.

adarshakb
10-22-2009, 06:49 PM
javascript, more exactly you can do this using ajax and/or json. Usualy you also need to know many other things more or less.

best regards

hmmm.. thks.. any specific references anyone can provide me which shows how to connect in real time.. like tutorials etc..?

Fumigator
10-22-2009, 07:45 PM
You really need to get it out of your head that you can "connect" two browsers to each other. That's not how it works at all. It's not like you're stringing a 10-base-T cable between two computers to get an IPX connection established to play Doom II.

As CFMaBiSmAd smartly put it, a browser requests information from a Server, usually a Web Server using the HTTP protocol, and can then interact with a user via HTML and Javascripting. Two different computer's browsers can interact with the same Web Server using this HTTP protocol, and in this way they can play a game of chess. But you as the web developer will have to utilize this pipeline to get the job done. This typically involves HTML, CSS, Javascript, and a server language such as PHP, ASP, ColdFusion, etc.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum