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
__________________
Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.
Albert Einstein
----------------------------------------------------- My Blogsongs
Last edited by adarshakb; 10-22-2009 at 05:11 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
__________________
Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.
Albert Einstein
----------------------------------------------------- My Blogsongs
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.
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.
__________________
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,687
Thanks: 42
Thanked 637 Times in 625 Posts
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.