1. sorry I just can't figure this out but
    I made a stats website but it doesn't update players stats. it's something to do with the api key.
    Please halp

    TL;DR Made stats website, players stats don't update, need help with that.
     
    #1
    • Funny Funny x 1
  2. Probably caching the data for an amount of time, how exactly are you getting the stats?
     
    #2
    • Funny Funny x 1
  3. well I use the thing you told me on the other thread (text box with button to get stats)
    and I have this on the start of the index.php:
    Code:
    <?php
    include_once('HypixelPHP.php');
    $HypixelPHP = new HypixelPHP\HypixelPHP(['api_key' => '*api key*']);
    ?>
    
     
    #3
    • Funny Funny x 1
  4. So you are succeeding in getting the stats, but they don't update on refresh?
     
    #4
    • Funny Funny x 1
  5. Yes
     
    #5
    • Funny Funny x 1
  6. Edit the cache times:
    Code:
    $HypixelAPI = new HypixelPHP\HypixelPHP([
            'api_key' => '',
            'cache_times' => [
                  CACHE_TIMES::OVERALL => 600,
                  CACHE_TIMES::PLAYER => 600,
                  CACHE_TIMES::UUID => 864000,
                  CACHE_TIMES::UUID_NOT_FOUND => 600,
                  CACHE_TIMES::GUILD => 600,
                  CACHE_TIMES::GUILD_NOT_FOUND => 600
            ]
    ])
    
     
    #6
    • Agree Agree x 1
    • Funny Funny x 1
  7. Exactly, but note that lowering that time may decrease the loading performance of your application if it's reloading the data every time :)
     
    #7
    • Funny Funny x 1
  8. It still doesn't work..?
    EDIT: Never mind figured it out myself
     
    #8
    Last edited: Jul 13, 2016
    • Funny Funny x 1

Share This Page