Page 8 of 9 FirstFirst ... 6789 LastLast
Results 141 to 160 of 175
  1. #141
    New User
    Join Date
    2012-04-14
    Posts
    5

    Re: AW: Re: AW: Re: API PHP example with table output

    Quote Originally Posted by ZA Tony View Post
    kannste mir mal die komplette Datei schicken?
    thx ! hier die datei
    dsboard_php.zip

  2. #142
    Member
    Join Date
    2011-11-08
    Location
    NRW
    Posts
    112
    BFBC2 PC
    Tony_GER
    BF3 PC
    xXxT0NYxXx

    AW: Re: AW: Re: AW: Re: API PHP example with table output

    Problem gefunden:

    http://schulte-solingen.de/za/bf3/dsboard.zip

    The problem is this code:

    PHP Code:
    $stats[$i]['knife']                = $data['list'][$player]['stat'][c_wasK__kwa_g]; 
    PHP Code:
    $stats[$i]['knife']                = $data['list'][$player]['stat']['c_wasK__kwa_g']; 

  3. #143
    New User
    Join Date
    2012-04-14
    Posts
    5

    Re: AW: Re: AW: Re: AW: Re: API PHP example with table output

    Your original file is here
    http://baumpflege-spamer.de/dx/bf3/dsboard.php

    but unfortunately its not showing me Knife-Kills ;(
    any ideas ?

  4. #144
    Member
    Join Date
    2011-11-08
    Location
    NRW
    Posts
    112
    BFBC2 PC
    Tony_GER
    BF3 PC
    xXxT0NYxXx

    AW: Re: AW: Re: AW: Re: AW: Re: API PHP example with table output

    Change this code:
    PHP Code:
    $stats[$i]['knife']                = $data['list'][$player]['stat'][c_wasK__kwa_g]; 
    in this right code:

    PHP Code:
    $stats[$i]['knife']                = $data['list'][$player]['stat']['c_wasK__kwa_g']; 
    Than you can see your knife kills.

  5. #145
    New User
    Join Date
    2012-04-14
    Posts
    5

    Re: AW: Re: AW: Re: AW: Re: AW: Re: API PHP example with table output

    Quote Originally Posted by ZA Tony View Post
    Change this code:
    PHP Code:
    $stats[$i]['knife']                = $data['list'][$player]['stat'][c_wasK__kwa_g]; 
    in this right code:

    PHP Code:
    $stats[$i]['knife']                = $data['list'][$player]['stat']['c_wasK__kwa_g']; 
    Than you can see your knife kills.
    It is already in the Code you'd given me. Your File was uploaded without any changes but no Knife-Kills? wth?
    http://baumpflege-spamer.de/dx/bf3/dsboard.php
    Can you confirm that? i got no clue.

    PHP Code:
    <link rel="stylesheet" type="text/css" href="./css/bf3.css">
    <script type="text/javascript" language="JavaScript">
    <!-- Copyright 2006,2007 Bontrager Connection, LLC
    // http://bontragerconnection.com/ and http://www.willmaster.com/
    // Version: July 28, 2007
    // javascript for floating table at mouse position
    var cX = 0; var cY = 0; var rX = 0; var rY = 0;
    function UpdateCursorPosition(e){ cX = e.pageX; cY = e.pageY;}
    function UpdateCursorPositionDocAll(e){ cX = event.clientX; cY = event.clientY;}
    if(document.all) { document.onmousemove = UpdateCursorPositionDocAll; }
    else { document.onmousemove = UpdateCursorPosition; }
    function AssignPosition(d) {
    if(self.pageYOffset) {
        rX = self.pageXOffset;
        rY = self.pageYOffset;
        }
    else if(document.documentElement && document.documentElement.scrollMiddle) {
        rX = document.documentElement.scrollLeft;
        rY = document.documentElement.scrollMiddle;
        }
    else if(document.body) {
        rX = document.body.scrollLeft;
        rY = document.body.scrollMiddle;
        }
    if(document.all) {
        cX += rX; 
        cY += rY;
        }
    d.style.left = (cX+10) + "px";
    d.style.middle = (cY+10) + "px";
    }
    function HideContent(d) {
    if(d.length < 1) { return; }
    document.getElementById(d).style.display = "none";
    }
    function ShowContent(d) {
    if(d.length < 1) { return; }
    var dd = document.getElementById(d);
    AssignPosition(dd);
    dd.style.display = "block";
    }
    function ReverseContentDisplay(d) {
    if(d.length < 1) { return; }
    var dd = document.getElementById(d);
    AssignPosition(dd);
    if(dd.style.display == "none") { dd.style.display = "block"; }
    else { dd.style.display = "none"; }
    }
    //-->
    </script>


    <?php


    $playerData 
    = array('players' => array(), 'opt' => array());

    // Our list of players


    $playerData['players'][]        = 'ekomanic';
    $playerData['players'][]         = 'Blumentopp';
    $playerData['players'][]         = 'tron0071';
    $playerData['players'][]         = 'AndyGrenzen';
    $playerData['players'][]         = 'Faultierchief';
    $playerData['players'][]         = 'darkdever';
    $playerData['players'][]         = 'LtCmdr85';
    $playerData['players'][]         = 'dont4get-murdock';
    $playerData['players'][]         = 'mehdi2109';
    $playerData['players'][]         = 'DopplerWobble';
    $playerData['players'][]         = 'VY_CanisMajoris1';
    $playerData['players'][]         = 'YoShIs_ReVeNgE';


    /* In this example we want as little information to come back from the API as possible.
    ** Therefore we are calling the "clear" function, which means we need to manually enable
    ** each stat group we need. This will help keep the size of the response down, and therefore execution time.
    */
    $playerData['opt']['clear']        = true;

    // Data we want to be returned
    $playerdata['opt']['all']      = true;
    $playerData['opt']['global']    = true;
    $playerData['opt']['nextranks']    = true;
    $playerData['opt']['rank']        = true;
    $playerData['opt']['kits']        = true;
    $playerData['opt']['scores']    = true;
    $playerData['opt']['imgInfo']    = true;
    $playerData['opt']['awards']    = true;
    $playerdata['opt']['awardsInfo']  = true;
    $playerdata['opt']['awardsAwarded']      = true;
    $playerData['opt']['ribbons']    = true;
    $playerData['opt']['medals']    = true;
    $playerData['opt']['raw']    = true;
    $playerData['opt']['nozero']    = true;
    $playerData['opt']['coop']    = true;
    $playerdata['opt']['coopInfo']  = true;
    $playerdata['opt']['coopimg']      = true;


    // Convert lists to JSON ready for the curl post request
    $postData                        = array();
    $postData['players']            = json_encode($playerData['players']);
    $postData['opt']                = json_encode($playerData['opt']);

    // This example hardcodes "pc" players
    $c curl_init('http://api.bf3stats.com/pc/playerlist/');
    curl_setopt($cCURLOPT_HEADERfalse);
    curl_setopt($cCURLOPT_POSTtrue);
    curl_setopt($cCURLOPT_USERAGENT'BF3StatsAPI/0.1');
    curl_setopt($cCURLOPT_HTTPHEADER, array('Expect:'));
    curl_setopt($cCURLOPT_RETURNTRANSFERtrue);
    curl_setopt($cCURLOPT_POSTFIELDS$postData);
    $response      curl_exec($c);
    $statusCode    curl_getinfo($cCURLINFO_HTTP_CODE);
    curl_close($c);

    // 200 means a successful call
    if($statusCode == 200
    {
        
    // Decode JSON Data into an array we can easily parse
        
    $data json_decode($responsetrue);
        
        
    // Counter for our players array
        
    $i 0;
        
        
    // Loop through each of our players we set above and see what data we have for them
        
    foreach($playerData['players'] AS $player)
        {
            
    // Does this player exist in the returned data?
            
    if(isset($data['list'][$player]))
            {
                
    // This checks to see if the player actually has any stats yet on the site
                
    if($data['list'][$player]['status'] == "data")
                {
                    
    $stats[$i]['name']                  = $data['list'][$player]['name'];
                    
    $stats[$i]['country_name']          = $data['list'][$player]['country'];
                    
    $stats[$i]['rank']                  = $data['list'][$player]['stats']['rank']['nr'];
                    
    $stats[$i]['ranktest']              = $data['list'][$player]['stat']['kdr'];
                    
    $stats[$i]['rank2']                 = $data['list'][$player]['stats']['rank']['img_info'];
                    
    $stats[$i]['name1']                 = $data['list'][$player]['stats']['rank']['name'];
                    
    $stats[$i]['ribbonsimgr10']         = $data['list'][$player]['stats']['ribbons']['r10']['img_small'];
                    
    $stats[$i]['ribbonscountr10']       = $data['list'][$player]['stats']['ribbons']['r10']['count'];
                    
    $stats[$i]['ribbonsnamer10']        = $data['list'][$player]['stats']['ribbons']['r10']['name'];
                    
    $stats[$i]['ribbonsimgr11']         = $data['list'][$player]['stats']['ribbons']['r11']['img_small'];
                    
    $stats[$i]['ribbonscountr11']       = $data['list'][$player]['stats']['ribbons']['r11']['count'];
                    
    $stats[$i]['ribbonsnamer11']        = $data['list'][$player]['stats']['ribbons']['r11']['name'];
                    
    $stats[$i]['ribbonsimgr12']         = $data['list'][$player]['stats']['ribbons']['r12']['img_small'];
                    
    $stats[$i]['ribbonscountr12']       = $data['list'][$player]['stats']['ribbons']['r12']['count'];
                    
    $stats[$i]['ribbonsnamer12']        = $data['list'][$player]['stats']['ribbons']['r12']['name'];
                    
    $stats[$i]['ribbonsimgr13']         = $data['list'][$player]['stats']['ribbons']['r13']['img_small'];
                    
    $stats[$i]['ribbonscountr13']       = $data['list'][$player]['stats']['ribbons']['r13']['count'];
                    
    $stats[$i]['ribbonsnamer13']        = $data['list'][$player]['stats']['ribbons']['r13']['name'];
                    
    $stats[$i]['ribbonsimgr14']         = $data['list'][$player]['stats']['ribbons']['r14']['img_small'];
                    
    $stats[$i]['ribbonscountr14']       = $data['list'][$player]['stats']['ribbons']['r14']['count'];
                    
    $stats[$i]['ribbonsnamer14']        = $data['list'][$player]['stats']['ribbons']['r14']['name'];
                    
    $stats[$i]['ribbonsimgr15']         = $data['list'][$player]['stats']['ribbons']['r15']['img_small'];
                    
    $stats[$i]['ribbonscountr15']       = $data['list'][$player]['stats']['ribbons']['r15']['count'];                               
                    
    $stats[$i]['ribbonsnamer15']        = $data['list'][$player]['stats']['ribbons']['r15']['name'];
                    
    $stats[$i]['ribbonsimgr16']         = $data['list'][$player]['stats']['ribbons']['r16']['img_small'];
                    
    $stats[$i]['ribbonscountr16']       = $data['list'][$player]['stats']['ribbons']['r16']['count'];
                    
    $stats[$i]['ribbonsnamer16']        = $data['list'][$player]['stats']['ribbons']['r16']['name'];
                    
    $stats[$i]['ribbonsimgr17']         = $data['list'][$player]['stats']['ribbons']['r17']['img_small'];
                    
    $stats[$i]['ribbonscountr17']       = $data['list'][$player]['stats']['ribbons']['r17']['count'];
                    
    $stats[$i]['ribbonsnamer17']        = $data['list'][$player]['stats']['ribbons']['r17']['name'];
                    
    $stats[$i]['ribbonsimgr18']         = $data['list'][$player]['stats']['ribbons']['r18']['img_small'];
                    
    $stats[$i]['ribbonscountr18']       = $data['list'][$player]['stats']['ribbons']['r18']['count'];
                    
    $stats[$i]['ribbonsnamer18']        = $data['list'][$player]['stats']['ribbons']['r18']['name'];
                    
    $stats[$i]['ribbonsimgr19']         = $data['list'][$player]['stats']['ribbons']['r19']['img_small'];
                    
    $stats[$i]['ribbonscountr19']       = $data['list'][$player]['stats']['ribbons']['r19']['count'];
                    
    $stats[$i]['ribbonsnamer19']        = $data['list'][$player]['stats']['ribbons']['r19']['name'];
                    
    $stats[$i]['ribbonsimgr20']         = $data['list'][$player]['stats']['ribbons']['r20']['img_small'];
                    
    $stats[$i]['ribbonscountr20']       = $data['list'][$player]['stats']['ribbons']['r20']['count'];
                    
    $stats[$i]['ribbonsnamer20']        = $data['list'][$player]['stats']['ribbons']['r20']['name'];
                    
    $stats[$i]['ribbonsimgr21']         = $data['list'][$player]['stats']['ribbons']['r21']['img_small'];
                    
    $stats[$i]['ribbonscountr21']       = $data['list'][$player]['stats']['ribbons']['r21']['count'];
                    
    $stats[$i]['ribbonsnamer21']        = $data['list'][$player]['stats']['ribbons']['r21']['name'];
                    
    $stats[$i]['ribbonsimgr22']         = $data['list'][$player]['stats']['ribbons']['r22']['img_small'];
                    
    $stats[$i]['ribbonscountr22']       = $data['list'][$player]['stats']['ribbons']['r22']['count'];
                    
    $stats[$i]['ribbonsnamer22']        = $data['list'][$player]['stats']['ribbons']['r22']['name'];
                    
    $stats[$i]['ribbonsimgr23']         = $data['list'][$player]['stats']['ribbons']['r23']['img_small'];
                    
    $stats[$i]['ribbonscountr23']       = $data['list'][$player]['stats']['ribbons']['r23']['count'];                               
                    
    $stats[$i]['ribbonsnamer23']        = $data['list'][$player]['stats']['ribbons']['r23']['name'];
                    
    $stats[$i]['ribbonsimgr25']         = $data['list'][$player]['stats']['ribbons']['r25']['img_small'];
                    
    $stats[$i]['ribbonscountr25']       = $data['list'][$player]['stats']['ribbons']['r25']['count'];
                    
    $stats[$i]['ribbonsnamer25']        = $data['list'][$player]['stats']['ribbons']['r25']['name'];
                    
    $stats[$i]['ribbonsimgr27']         = $data['list'][$player]['stats']['ribbons']['r27']['img_small'];
                    
    $stats[$i]['ribbonscountr27']       = $data['list'][$player]['stats']['ribbons']['r27']['count'];
                    
    $stats[$i]['ribbonsnamer27']        = $data['list'][$player]['stats']['ribbons']['r27']['name'];
                    
    $stats[$i]['ribbonsimgr31']         = $data['list'][$player]['stats']['ribbons']['r31']['img_small'];
                    
    $stats[$i]['ribbonscountr31']       = $data['list'][$player]['stats']['ribbons']['r31']['count'];
                    
    $stats[$i]['ribbonsnamer31']        = $data['list'][$player]['stats']['ribbons']['r31']['name'];
                    
    $stats[$i]['ribbonsimgr32']         = $data['list'][$player]['stats']['ribbons']['r32']['img_small'];
                    
    $stats[$i]['ribbonscountr32']       = $data['list'][$player]['stats']['ribbons']['r32']['count'];
                    
    $stats[$i]['ribbonsnamer32']        = $data['list'][$player]['stats']['ribbons']['r32']['name'];
                    
    $stats[$i]['ribbonsimgr40']         = $data['list'][$player]['stats']['ribbons']['r40']['img_small'];
                    
    $stats[$i]['ribbonscountr40']       = $data['list'][$player]['stats']['ribbons']['r40']['count'];
                    
    $stats[$i]['ribbonsnamer40']        = $data['list'][$player]['stats']['ribbons']['r40']['name'];
                    
    $stats[$i]['ribbonsimgr41']         = $data['list'][$player]['stats']['ribbons']['r41']['img_small'];
                    
    $stats[$i]['ribbonscountr41']       = $data['list'][$player]['stats']['ribbons']['r41']['count'];
                    
    $stats[$i]['ribbonsnamer41']        = $data['list'][$player]['stats']['ribbons']['r41']['name'];
                    
    $stats[$i]['ribbonsimgr43']         = $data['list'][$player]['stats']['ribbons']['r43']['img_small'];
                    
    $stats[$i]['ribbonscountr43']       = $data['list'][$player]['stats']['ribbons']['r43']['count'];
                    
    $stats[$i]['ribbonsnamer43']        = $data['list'][$player]['stats']['ribbons']['r43']['name'];
                    
    $stats[$i]['spm']                   = $data['list'][$player]['stats']['global']['time'];
                    
    $stats[$i]['last-update']           = date('d.m.y - H:i',$data['list'][$player]['stats']['date_check']); 
                    
    $stats[$i]['rankimg1']              = $data['list'][$player]['stats']['rank']['img_medium']; 
                    
    $stats[$i]['rankimg']               = $data['list'][$player]['stats']['rank']['img_tiny'];  
                    
    $stats[$i]['time']                  = $data['list'][$player]['stats']['global']['time'];
                    
    $stats[$i]['kills']                 = $data['list'][$player]['stats']['global']['kills'];
                    
    $stats[$i]['deaths']                = $data['list'][$player]['stats']['global']['deaths'];
                    
    $stats[$i]['skill']                 = $data['list'][$player]['stats']['global']['elo'];
                    
    $stats[$i]['score']                 = $data['list'][$player]['stats']['scores']['score'];
                    
    $stats[$i]['team']                  = $data['list'][$player]['stats']['scores']['team'];
                    
    $stats[$i]['dogtags']               = $data['list'][$player]['stats']['global']['dogtags'];
                    
    $stats[$i]['longesths']             = $data['list'][$player]['stats']['global']['longesths'];
                    
    $stats[$i]['wins']                  = $data['list'][$player]['stats']['global']['wins'];
                    
    $stats[$i]['losses']                = $data['list'][$player]['stats']['global']['losses'];
                    
    $stats[$i]['kits']                  = array();
                    
    $stats[$i]['progress']              = round(($data['list'][$player]['stats']['scores']['score']-$data['list'][$player]['stats']['rank']['score'])/($data['list'][$player]['stats']['nextranks']['0']['score']-$data['list'][$player]['stats']['rank']['score'])*100,0);
                    
    $stats[$i]['kits'][]                = array('name' => 'assault',     'time' => $data['list'][$player]['stats']['kits']['assault']['time']);
                    
    $stats[$i]['kits'][]                = array('name' => 'engineer',     'time' => $data['list'][$player]['stats']['kits']['engineer']['time']);
                    
    $stats[$i]['kits'][]                = array('name' => 'recon',     'time' => $data['list'][$player]['stats']['kits']['recon']['time']);
                    
    $stats[$i]['kits'][]                = array('name' => 'support',     'time' => $data['list'][$player]['stats']['kits']['support']['time']);
                    
    $stats[$i]['killassists']           = $data['list'][$player]['stats']['global']['killassists'];
                    
    $stats[$i]['revives']               = $data['list'][$player]['stats']['global']['revives'];
                    
    $stats[$i]['resupplies']            = $data['list'][$player]['stats']['global']['resupplies'];
                    
    $stats[$i]['heals']                 = $data['list'][$player]['stats']['global']['heals'];
                    
    $stats[$i]['headshots']             = $data['list'][$player]['stats']['global']['headshots'];
                    
    $stats[$i]['award']                 = $data['list'][$player]['stats']['scores']['award'];
                    
    $stats[$i]['bonus']                 = $data['list'][$player]['stats']['scores']['bonus'];
                    
    $stats[$i]['unlock']                = $data['list'][$player]['stats']['scores']['unlock'];
                    
    $stats[$i]['support']               = $data['list'][$player]['stats']['scores']['support'];
                    
    $stats[$i]['assault']               = $data['list'][$player]['stats']['scores']['assault'];
                    
    $stats[$i]['recon']                 = $data['list'][$player]['stats']['scores']['recon'];
                    
    $stats[$i]['engineer']              = $data['list'][$player]['stats']['scores']['engineer'];
                    
    $stats[$i]['scorecoop']             = $data['list'][$player]['stats']['coop']['score'];
                    
    $stats[$i]['vehicleall']            = $data['list'][$player]['stats']['scores']['vehicleall'];
                    
    $stats[$i]['scorecoop']             = $data['list'][$player]['stats']['coop']['score'];
                    
    $stats[$i]['killstreakbonus']       = $data['list'][$player]['stats']['global']['killstreakbonus'];
                    
    $stats[$i]['squad']                 = $data['list'][$player]['stats']['scores']['squad'];
                    
    $stats[$i]['objective']             = $data['list'][$player]['stats']['scores']['objective'];
                    
    $stats[$i]['shots']                 = $data['list'][$player]['stats']['global']['shots'];
                    
    $stats[$i]['hits']                  = $data['list'][$player]['stats']['global']['hits'];
                    
    $stats[$i]['vehiclekills']          = $data['list'][$player]['stats']['global']['vehiclekills'];
                    
    $stats[$i]['vehicledestroyassist']  = $data['list'][$player]['stats']['global']['vehicledestroyassist'];
                    
    $stats[$i]['killassists']           = $data['list'][$player]['stats']['global']['killassists'];
                    
    $stats[$i]['damagaassisits']        = $data['list'][$player]['stats']['global']['damagassists'];
                    
    $stats[$i]['avengerkills']          = $data['list'][$player]['stats']['global']['avengerkills'];
                    
    $stats[$i]['saviorkills']           = $data['list'][$player]['stats']['global']['saviorkills'];
                    
    $stats[$i]['nemesiskills']          = $data['list'][$player]['stats']['global']['nemesiskills'];
                    
    $stats[$i]['resupplies']            = $data['list'][$player]['stats']['global']['resupplies'];
                    
    $stats[$i]['revives']               = $data['list'][$player]['stats']['global']['revives'];
                    
    $stats[$i]['heals']                 = $data['list'][$player]['stats']['global']['heals'];
                    
    $stats[$i]['repairs']               = $data['list'][$player]['stats']['global']['repairs'];
                    
    $stats[$i]['vehicleah']             = $data['list'][$player]['stats']['scores']['vehicleah'];
                    
    $stats[$i]['vehicleifv']            = $data['list'][$player]['stats']['scores']['vehicleifv'];
                    
    $stats[$i]['vehiclejet']            = $data['list'][$player]['stats']['scores']['vehiclejet'];
                    
    $stats[$i]['vehiclembt']            = $data['list'][$player]['stats']['scores']['vehiclembt'];            
                    
    $stats[$i]['knife']                = $data['list'][$player]['stat']['c_wasK__kwa_g'];
                   
                   
                   
                    
    // Work out which is the most used kit                
                    
    usort($stats[$i]['kits'], 'sortKits');
                    
                    
    $stats[$i]['class']     = $stats[$i]['kits'][0]['name'];
                    
                    
    $i++;
                }
            }
        }
        
        
    // Order players based on score
        
    usort($stats'sortPlayers');


    ?>
    <center>

    <table cellpadding="8" cellspacing="1" style="border-850px:fixed; font-size:12px; font-family:arial,helvetica,sans-serif;">

           <thead>
                <tr>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC;">#</th>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC; width:160px;">Player</th>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC;">Rank</th>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC;">Progress</th>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC;">Score</th>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC;">Win/Loss</th>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC;">W/L Ratio</th>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC;">Kills/Deaths</th>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC;">K/D Ratio</th>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC;">Skill</th>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC;">Time</th>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC;">Dogtags</th>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC;">HeadShots</th>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC;">Long. HS</th>
                  <th style="color:#000000; font-size:12px; background-color:#CCCCCC;">Knife kills</th>
                </tr>
            </thead>
        
            <tbody>
           
            <?
            
    for($out 0$out count($stats); $out++):
                
    $pos $out 1?>
                                    </td>

                 

          <td align="center" bgcolor="#666666" class="first"><?=$pos?></td>
                  
                       
            <td bgcolor="#666666" class="soldier">
                               <img src="./flags/<?=$stats[$out]['country_name']?>.png" alt="<?=$stats[$out]['country']?>" />
                       <img src="./kits/<?=$stats[$out]['class']?>.png" alt="" />
                                                            

    <a href="http://bf3stats.com/stats_pc/<?=$stats[$out]['name']?>" target="_blank" onmousemove="ShowContent('uniquename<?=$out?>'); return true;" onmouseover=
    "ShowContent('uniquename<?=$out?>'); return true;" onmouseout="HideContent('uniquename<?=$out?>'); return true;" href="javascript:ShowContent('uniquename<?=
    $out?>
    ')">

        <font size="1" color="cccccc"><?=$stats[$out]['name']?></font></a></td>
                    
        <div id="uniquename<?=$out?>" style="display:none; position:fixed;  float:left; border-style:solid; border-width:1px; background-color:#000000; padding:2px; width:700; height:485;">
                    
        <img src="<?=$stats[$out]['rankimg1']?>" ALIGN="left" alt="<?=$stats[$out]['rank']?>" /> <br>

        <font size="5" color="ececec" style="font-family:arial,helvetica,sans-serif; float:left;"><?=$stats[$out]['name']?></font><br><br>
        <font size="1" color="999999" style="font-family:arial,helvetica,sans-serif; float:left;"><?=$stats[$out]['name1']?></font><br>



    <div class="floatleft" style="background-color:#242424; height:360; border:none; font-family:arial,helvetica,sans-serif; background-color:#242424;">
            <p align="left">
                <font size="1" color="999999">General Score: </font> 
                <font size="1" color="ececec"><?=$stats[$out]['score']?></font><br>
                <font size="1" color="999999">Objective Score: </font> 
                <font size="1" color="ececec"><?=$stats[$out]['objective']?></font><br>
                <font size="1" color="999999">Squad Score: </font>
                <font size="1" color="ececec"><?=$stats[$out]['squad']?></font><br>
                <font size="1" color="999999">Unlocks: </font>
                <font size="1" color="ececec"><?=round($stats[$out]['unlock'])?></font><br>
                <font size="1" color="999999">Bonus: </font>
                <font size="1" color="ececec"><?=round($stats[$out]['bonus'])?></font><br>
                <font size="1" color="999999">Awards: </font>
                <font size="1" color="ececec"><?=round($stats[$out]['award'])?></font><br>
                <font size="1" color="999999">Support: </font>
                <font size="1" color="ececec"><?=round($stats[$out]['support'])?></font><br>
                <font size="1" color="999999">Assault: </font>
                <font size="1" color="ececec"><?=round($stats[$out]['assault'])?></font><br>
                <font size="1" color="999999">Recon: </font>
                <font size="1" color="ececec"><?=round($stats[$out]['recon'])?></font><br>
                <font size="1" color="999999">Engineer: </font> 
                <font size="1" color="ececec"><?=round($stats[$out]['engineer'])?></font><br>
                <font size="1" color="999999">Vehicle Score: </font> 
                <font size="1" color="ececec"><?=($stats[$out]['vehicleall'])?></font><br>
                <font size="1" color="999999">All Vehicle Kills: </font> 
                <font size="1" color="ececec"><?=$stats[$out]['vehiclekills']?></font><br>
                <font size="1" color="999999">Attack Heli Score: </font> 
                <font size="1" color="ececec"><?=($stats[$out]['vehicleah'])?></font><br>
                <font size="1" color="999999">Ifv Score: </font> 
                <font size="1" color="ececec"><?=$stats[$out]['vehicleifv']?></font><br>
                <font size="1" color="999999">Jet Score: </font> 
                <font size="1" color="ececec"><?=$stats[$out]['vehiclejet']?></font><br>
                <font size="1" color="999999">Mbt Score: </font> 
                <font size="1" color="ececec"><?=$stats[$out]['vehiclembt']?></font><br>
                <font size="1" color="999999">Shots Fired: </font>
                <font size="1" color="ececec"><?=$stats[$out]['shots']?></font><br>
                <font size="1" color="999999">Total Hits: </font>
                <font size="1" color="ececec"><?=round($stats[$out]['hits'])?></font><br>
                <font size="1" color="999999">Kill Assists: </font>
                <font size="1" color="ececec"><?=round($stats[$out]['killassists'])?></font><br>
                <font size="1" color="999999">Revives: </font>
                <font size="1" color="ececec"><?=round($stats[$out]['revives'])?></font><br>
                <font size="1" color="999999">Resupplies: </font>
                <font size="1" color="ececec"><?=round($stats[$out]['resupplies'])?></font><br>
                <font size="1" color="999999">Heals: </font>
                <font size="1" color="ececec"><?=round($stats[$out]['heals'])?></font><br>
                <font size="1" color="999999">Repairs: </font>
                <font size="1" color="ececec"><?=round($stats[$out]['repairs'])?></font><br>
                          
            </p>
        </div><br />

    <div class="floatleft">                     
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>MVP</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr16']?>" /><br>
        <font size="1" color="FF3300" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr16'])?></font><br><br>
         
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>MVP 2</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr17']?>" /><br>
        <font size="1" color="FF3300" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr17'])?></font><br>
           
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font><br>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>MVP 3</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr18']?>" /><br>
        <font size="1" color="FF3300" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr18'])?></font><br><br>
         
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>ACE SQUAD</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr19']?>" /><br>
        <font size="1" color="FF3300" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr19'])?></font>                          
        </p>
        
        </div>
        <div class="floatleft">                     
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>TDM</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr32']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr32'])?></font><br><br>
         
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>CONQUEST</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr31']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr31'])?></font><br>
           
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font><br>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>ATTACK</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr40']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr40'])?></font><br><br>
         
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>DEFEND</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr41']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr41'])?></font>                          
        </p>
        
        </div>
        <div class="floatleft">                     
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>AVENGER</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr12']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr12'])?></font><br><br>
         
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>SAVIOR</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr13']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr13'])?></font><br>
           
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font><br>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>NEMESIS</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr14']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr14'])?></font><br><br>
         
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>SQUAD WIPE</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr23']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr23'])?></font>                          
        </p>
        
        </div>
        <div class="floatleft">                     
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>ACCURACY</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr11']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr11'])?></font><br><br>
         
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>SURPRESSION</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr15']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr15'])?></font><br>
           
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font><br>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>MAINTANANCE</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr43']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr43'])?></font><br><br>
         
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>EFFICENCY</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr20']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr20'])?></font>                          
        </p>
        
        </div>
        <div class="floatleft">                     
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>ANTI VEHICLE</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr10']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr10'])?></font><br><br>
         
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>AIR WARFARE</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr27']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr27'])?></font><br>
           
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font><br>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>ANTI EXPLOSIVE</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr21']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr21'])?></font><br><br>
         
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=$stats[$out]['ribbonsname']?></font>
        <font size="1" color="000000" style="font-family:arial,helvetica,sans-serif;"><b>TANK WARFARE</b></font><br> <img src="./<?=$stats[$out]['ribbonsimgr25']?>" /><br>
        <font size="1" color="ececec" style="font-family:arial,helvetica,sans-serif;"><?=round($stats[$out]['ribbonscountr25'])?></font>                          
        </p>
        
        
        
     <td align="center" style="background-color:#666666;">
        <img src="<?=$stats[$out]['rankimg']?>" alt="<?=$stats[$out]['rank']?>" />
    </td>
     
    <td style="width: 50px; background-color:#666666; color:#555555;" title="<?=number_format($stats[$out]['progress'],0,',','.')?> %">
     <p style="border: 1px solid black; width: 55px; background-color: #242424;">
     <span style="background-color: #ff8c00; display: block; padding: 2px; width: <?=number_format($stats[$out]['progress'],0,',','.')?>%">
     </span>
     </p>
     </td>
     </td>
                       
                        
        <td align="center" style="background-color:#666666; color:#cccccc;"><?=number_format($stats[$out]['score'])?></td>
        <td align="center" style="background-color:#666666; color:#cccccc;"><?=number_format($stats[$out]['wins'])?> / <?=number_format($stats[$out]['losses'])?></td>
        <td align="center" style="background-color:#666666; color:#cccccc;"><?=round($stats[$out]['wins']/$stats[$out]['losses'], 2)?></td>
        <td align="center" style="background-color:#666666; color:#cccccc;"><?=number_format($stats[$out]['kills'])?> / <?=number_format($stats[$out]['deaths'])?></td>
        <td align="center" style="background-color:#666666; color:#cccccc;""><?=$stats[$out]['ranktest']?></td>
        <td align="center" style="background-color:#666666; color:#cccccc;"><?=round($stats[$out]['skill'])?></td>  
        <td align="center" style="background-color:#666666; color:#cccccc;"><?=sec2hms($stats[$out]['time'])?>h</td>
        <td align="center" style="background-color:#666666; color:#cccccc;"><?=round($stats[$out]['dogtags'])?></td>
        <td align="center" style="background-color:#666666; color:#cccccc;"><?=round($stats[$out]['headshots'])?></td>
        <td align="center" style="background-color:#666666; color:#cccccc;"><?=round($stats[$out]['longesths'])?> m</td>
        <td align="center" style="background-color:#666666; color:#cccccc;"><?=number_format($stat[$out]['knife'],'','','.')?></td> 



     </tr>      
            <?
            
    endfor; ?>
                    
            </tbody>
        </table>  
        
    </center>


        <?
        
    // If you add ?debug=1 to the end of your script URL in the browser you can see what data is returned
        
    if(isset($_GET['debug']))
        {
            echo 
    '<pre>';
                
    print_r($data);
            echo 
    '</pre>';
        }    

    else 
    {
        echo 
    'Error contacting API status code: '.$statusCode;
    }

    // Lets dump our functions down here, these would be better in a seperate include though

    function sortKits($x$y)
    {
        if(
    $x['time'] == $y['time'])
        {
            return 
    0;
        }
        elseif(
    $x['time'] < $y['time'])
        {
            return 
    1;
        }
        else
        {
            return -
    1;
        }
    }

    function 
    sortPlayers($x$y)
    {
        if(
    $x['score'] == $y['score'])
        {
            return 
    0;
        }
        elseif(
    $x['score'] < $y['score'])
        {
            return 
    1;
        }
        else
        {
            return -
    1;
        }
    }

    // Convert seconds to hours
    function sec2hms($sec$padHours false
    {
        
    $hms     "";
        
    $hours     intval(intval($sec) / 3600); 
        
    $hms     .= ($padHours)? str_pad($hours2"0"STR_PAD_LEFT). ':' $hours;    
        return 
    $hms;
    }
    ?>

  6. #146
    Member
    Join Date
    2011-11-08
    Location
    NRW
    Posts
    112
    BFBC2 PC
    Tony_GER
    BF3 PC
    xXxT0NYxXx

    AW: Re: AW: Re: AW: Re: AW: Re: AW: Re: API PHP example with table output

    This is the right file. Delete all other files, download and upload this in your webspace.

    http://schulte-solingen.de/za/bf3/dsboard.zip

  7. #147

    Re: API PHP example with table output

    Sorry if this has been asked before, however is there a way to get the API results into a Vbulletin forum thread?

  8. #148
    Member
    Join Date
    2011-11-08
    Location
    NRW
    Posts
    112
    BFBC2 PC
    Tony_GER
    BF3 PC
    xXxT0NYxXx

    AW: Re: API PHP example with table output

    I think, the best way is IFRAME.
    See here
    http://www.vbulletin.org/forum/showthread.php?t=229035

  9. #149

    Re: AW: Re: API PHP example with table output

    Quote Originally Posted by ZA Tony View Post
    I think, the best way is IFRAME.
    See here
    http://www.vbulletin.org/forum/showthread.php?t=229035
    Thats sometype of HTML usergroup based hack. However I found another thread and I was able to get the Iframe working, however after the stats page finishes loading, then it refreshes with the stats page with this site instead of the vb thread.
    Last edited by WOLVERIN-E; 2012-04-17 at 17:23.

  10. #150
    Member
    Join Date
    2011-11-08
    Location
    NRW
    Posts
    112
    BFBC2 PC
    Tony_GER
    BF3 PC
    xXxT0NYxXx

    AW: Re: AW: Re: API PHP example with table output

    Can you post URL Link from your Statssite?

  11. #151

    Re: API PHP example with table output

    http://bf3stats.com/stats_ps3/WOLVERIN-E

    here is the one in our forums with the iframe.

    http://www.101stscreamingeagles.net/...p?pageid=games

    I wish there was a way to just show the stats instead of all of the extra stuff within that page and still give credit to this site.

  12. #152
    Member
    Join Date
    2011-11-08
    Location
    NRW
    Posts
    112
    BFBC2 PC
    Tony_GER
    BF3 PC
    xXxT0NYxXx

    AW: Re: API PHP example with table output

    Sorry, i mean your website.

  13. #153
    Member
    Join Date
    2011-11-08
    Location
    NRW
    Posts
    112
    BFBC2 PC
    Tony_GER
    BF3 PC
    xXxT0NYxXx

    AW: Re: API PHP example with table output

    Quote Originally Posted by WOLVERIN-E View Post
    http://bf3stats.com/stats_ps3/WOLVERIN-E

    here is the one in our forums with the iframe.

    http://www.101stscreamingeagles.net/...p?pageid=games

    I wish there was a way to just show the stats instead of all of the extra stuff within that page and still give credit to this site.
    This is not a good idea. You can download my Stats here:

    http://schulte-solingen.de/za/leaderboard_en.zip

    Upload this zip file. Now you must change platform and Player:

    platform
    PHP Code:
    $c curl_init('http://api.bf3stats.com/ps3/playerlist/'); 
    Player
    PHP Code:

    $playerData
    ['players'][]         = 'your name1';
    $playerData['players'][]         = 'your name2'

  14. #154
    Member
    Join Date
    2011-11-08
    Location
    NRW
    Posts
    112
    BFBC2 PC
    Tony_GER
    BF3 PC
    xXxT0NYxXx

    AW: Re: API PHP example with table output

    Is this your Statssite?
    http://www.101stscreamingeagles.net/...p?pageid=STATS
    width is not defined. here an example for this:
    PHP Code:
    <iframe src="../yourstatssite" width="90%" height="90%" name="what ever"

  15. #155

    Re: API PHP example with table output

    Do I upload the entire leaderboard folder or just the folder within inside the forums folder?

  16. #156

    Re: AW: Re: API PHP example with table output

    Quote Originally Posted by ZA Tony View Post
    Is this your Statssite?
    http://www.101stscreamingeagles.net/...p?pageid=STATS
    width is not defined. here an example for this:
    PHP Code:
    <iframe src="../yourstatssite" width="90%" height="90%" name="what ever"
    I was just playing with that one, I don't think I will use it.

  17. #157
    Member
    Join Date
    2011-11-08
    Location
    NRW
    Posts
    112
    BFBC2 PC
    Tony_GER
    BF3 PC
    xXxT0NYxXx

    AW: Re: AW: Re: API PHP example with table output

    Nice, but i forget the images, download and upload in the same folder in your leaderboard.php.

    http://bf3stats.com/bf3stats.com_images.zip

  18. #158

    Re: API PHP example with table output


  19. #159
    Member
    Join Date
    2011-11-08
    Location
    NRW
    Posts
    112
    BFBC2 PC
    Tony_GER
    BF3 PC
    xXxT0NYxXx

    AW: Re: API PHP example with table output

    Yes, but i working at an update.
    Here ist my new Leaderboard.

    http://schulte-solingen.de/za/bf3/bf3stats.php

    klick on bold points.

  20. #160

    Re: AW: Re: API PHP example with table output

    Quote Originally Posted by ZA Tony View Post
    Yes, but i working at an update.
    Here ist my new Leaderboard.

    http://schulte-solingen.de/za/bf3/bf3stats.php

    klick on bold points.
    Oh yeah much better, I like it. Thanks.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
P-STATS NETWORK FORUM LOGIN CREATE ACCOUNT