1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Sockets vs XMLRequest... ??

Discussion in 'PHP' started by drewbe121212, Sep 18, 2006.

  1. #1
    I am currently working on a project (some may have experienced the test AJAX chatroom I made a few weeks ago).

    Anyways, this project requires the ability of many computers gathering up to date information (to the second) from a database.

    With the XMLRequest, I can manipulate the data and retrieve it exactly as I need it. The only problem is that each and every second (on every computer on the page) a new XML request is being generated. This seems some what feasible, however the bandwidth consumption can start to get pretty agressive.

    A socket connection could solve this, but data cannot be retrieved from a database through the use of a socket, only retrieve the data that is currently being sent. My understanding of sockets is very limited, so if anyone has a good tutorial to which can show the way of using sockets, for instance to retrieve the next set of messages that are awaiting. Or maybe not even messages, but a way to extract specific data. Like I said, my understanding of sockets is very limited and if this can be used versus an XMLRequest this would be awesome.

    Thoughts/ideas/suggestions or general comments on sockets alone are more then welcome!!
     
    drewbe121212, Sep 18, 2006 IP