Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder adarshakb's Avatar
    Join Date
    Jun 2009
    Location
    Silicon valley of india
    Posts
    247
    Thanks
    11
    Thanked 1 Time in 1 Post

    Exclamation Connection B/W 2 browsers

    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
    Last edited by adarshakb; 10-22-2009 at 05:11 PM.
    Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.

    Albert Einstein
    -----------------------------------------------------
    My Blog songs

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Start with a web server and go from there.

  • #3
    Regular Coder adarshakb's Avatar
    Join Date
    Jun 2009
    Location
    Silicon valley of india
    Posts
    247
    Thanks
    11
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Fumigator View Post
    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
    Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.

    Albert Einstein
    -----------------------------------------------------
    My Blog songs

  • #4
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by adarshakb View Post
    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

  • #5
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,063
    Thanks
    2
    Thanked 317 Times in 309 Posts
    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.

  • #6
    Regular Coder adarshakb's Avatar
    Join Date
    Jun 2009
    Location
    Silicon valley of india
    Posts
    247
    Thanks
    11
    Thanked 1 Time in 1 Post
    Quote Originally Posted by oesxyl View Post
    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..?
    Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.

    Albert Einstein
    -----------------------------------------------------
    My Blog songs

  • #7
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •