Example #1
0
 function fetch_new($data)
 {
     // Fetch character data [ BNET - Character Data ]
     $fetchedBnet = roster_BNET::fetch_char($data['character'], $data['server']);
     $fetchedWCLogs = WCLogs::fetch_char_rankings($data['character'], $data['server']);
     if ($fetchedBnet->code === 200) {
         // Save returned data to DB
         roster_db::save_new(json_decode($fetchedBnet->content, true), json_decode($fetchedWCLogs->content, true));
     } else {
         echo 'Character could not be found :(';
     }
 }
Example #2
0
function fetchCharDat()
{
    $charTOfetch = $_GET['Char'];
    $fromWHATserver = $_GET['Server'];
    // Fetch character data [ BNET - Character Data ]
    $fetchedBnet = roster_BNET::fetch_char($charTOfetch, $fromWHATserver);
    $fetchedWCLogs = WCLogs::fetch_char_rankings($charTOfetch, $fromWHATserver);
    if ($fetchedBnet->code === 200) {
        // Show user that things are happening
        fetchText();
        // Save returned data to DB
        roster_db::save_new(json_decode($fetchedBnet->content, true), json_decode($fetchedWCLogs->content, true));
    } else {
        nochar();
    }
}