Displaying data from and API

Discussion in 'Programming' started by KillaKeith, Aug 12, 2014.

  1. #1
    I would like to display data retrieved from an API, which will be in JSON format, on my website. This data will be from an online game. I would like that data to refresh after x amount of time. I will be placing this in a block in the sidebar of my forum, so I would be making a PHP template to insert. Could you direct me to documentation that would cover all that?
     
    KillaKeith, Aug 12, 2014 IP
  2. spujap

    spujap Active Member

    Messages:
    136
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    53
    #2
    If you are using Javascript/Jquery to retrieve data from API then you can use setInterval.

    http://stackoverflow.com/questions/5052543/how-to-fire-ajax-request-periodically
     
    spujap, Aug 16, 2014 IP
  3. abhicyco

    abhicyco Active Member

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    75
    #3
    You can use setTimeOut functionality with ajax to acheive your target.
     
    abhicyco, Aug 21, 2014 IP