Digital Point Spy Feature

Discussion in 'PHP' started by Silver89, Feb 19, 2008.

  1. #1
    What php does this use to keep getting the latest posts from the databases?

    http://forums.digitalpoint.com/spy.php

    I would like to create a chatroom feature with the same sort of refresh?

    Thanks :)
     
    Silver89, Feb 19, 2008 IP
  2. zerxer

    zerxer Peon

    Messages:
    368
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It uses AJAX, which is utilized using JavaScript. I just checked it out and it grabs an XML document of recent topics (a bunch at once) then slowly displays them and like ~30-60 seconds later, it grabs the file again with new results (so it's not actually showing everything every second.. it's showing the past X amount every minute or so).

    As for the PHP it uses to actually grab the topics to output as the XML data that is returned to this page, I'm sure it's just simple database queries to grab the last X amount of posts.
     
    zerxer, Feb 19, 2008 IP
  3. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #3
    Does anyone know how i can refresh an sql query every few seconds for a chat room?
     
    Silver89, Mar 18, 2008 IP
  4. Shazz

    Shazz Prominent Member

    Messages:
    8,395
    Likes Received:
    453
    Best Answers:
    0
    Trophy Points:
    330
    #4
    Shazz, Mar 18, 2008 IP
    buffalo likes this.