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.

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?
    SEMrush
     
    KillaKeith, Aug 12, 2014 IP
    SEMrush
  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