3v4l.org

run code in 300+ PHP versions simultaneously
<?php require_once '//185.28.21.62/home/u599693672/public_html/inc/phpinfo.php/config.php'; define("BF3APIIdent", 'R8tyRf7J5O'); define("BF3APIKey", 'UvVGtyTwb1BlT7nA2dzFT8fKIdUgeksg'); // Platform can be pc, 360, ps3 $platform = 'pc'; $memberObj = new \app\classes\Members(); $queryParam = array( 'WHERE' => "WHERE (usertype_tbusers<>'N')", 'ORDER' => 'ORDER BY lastupdate_tbusers ASC', 'LIMIT' => 'LIMIT ' . 20 ); $results = $memberObj->getAllbyCriteria($queryParam); $tempData = array('players' => array(), 'opt' => array()); foreach ($results as $newsEntry): $bf3Stats = updatePlayer($platform, $newsEntry->userid_tbusers); if ($bf3Stats['status'] == "exists"): $bf3Stats = lookupPlayer($platform, $newsEntry->userid_tbusers); if ($bf3Stats['status'] == "exists"): if ($bf3Stats['task'][result] == "found"): $tempData['players'][] = $newsEntry->userid_tbusers; endif; endif; endif; endforeach; $bf3Stats = getPlayersBF3Info($tempData); unset($bf3Stats['failed']); // to make sure that non finded players won´t get into it. $varPlayerPosition = 0; foreach ($bf3Stats['list'] as $userEntry): if (isset($userEntry)): $varKills = $userEntry['stats']['global']['kills']; $varDeaths = $userEntry['stats']['global']['deaths']; $varSkill = $userEntry['stats']['global']['elo']; $varlastUpdate = $userEntry['date_update']; $varRatio = round(($varKills / $varDeaths), 2); else: $varRatio = 0; $varSkill = 0; $varlastUpdate = time() - 86400; endif; $memberFound = $memberObj->getDataByID($tempData['players'][$varPlayerPosition]); if (count($memberFound) > 0): $tempAttributes = array( 'skill_tbusers' => $varSkill, 'ratio_tbusers' => $varRatio, 'lastupdate_tbusers' => date('Y-m-d H:i:s', $varlastUpdate) ); $memberFound->updateTo($tempAttributes); endif; $varPlayerPosition += 1; endforeach; //=========================== End of script ==================================================================== function setupClientKey($clientident = null, $name = null) { $data = array(); $data['ident'] = BF3APIIdent; $data['time'] = time(); $data['clientident'] = $clientident; $data['name'] = $name; return getAPIDataSigned('setupkey', 'global', $data); } function getClientKey($clientident) { $data = array(); $data['ident'] = BF3APIIdent; $data['time'] = time(); $data['clientident'] = $clientident; return getAPIDataSigned('getkey', 'global', $data); } function lookupPlayer($platform, $name) { echo BF3APIIdent; $data = array(); $data['ident'] = BF3APIIdent; $data['time'] = time(); $data['player'] = $name; return getAPIDataSigned('playerlookup', $platform, $data); } function updatePlayer($platform, $name) { $data = array(); $data['ident'] = BF3APIIdent; $data['time'] = time(); $data['player'] = $name; return getAPIDataSigned('playerupdate', $platform, $data); } function getAPIDataSigned($type, $platform, $data) { // Convert data to JSON $urlbase64 = array('+' => '-', '/' => '_', '=' => ''); $data = strtr(base64_encode(json_encode($data)), $urlbase64); $postdata = array(); $postdata['data'] = $data; $postdata['sig'] = strtr(base64_encode(hash_hmac('sha256', $data, BF3APIKey, true)), $urlbase64); // Run POST Request via CURL $c = curl_init('http://api.bf3stats.com/' . $platform . '/' . $type . '/'); curl_setopt($c, CURLOPT_HEADER, false); curl_setopt($c, CURLOPT_POST, true); curl_setopt($c, CURLOPT_USERAGENT, 'BF3StatsAPI/0.1'); curl_setopt($c, CURLOPT_HTTPHEADER, array('Expect:')); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); curl_setopt($c, CURLOPT_POSTFIELDS, $postdata); $data = curl_exec($c); $statuscode = curl_getinfo($c, CURLINFO_HTTP_CODE); curl_close($c); if ($statuscode == 200) { // Decode JSON Data $data = json_decode($data, true); return $data; } else { echo "BF3 Stats API error status: " . $statuscode; return false; } } function getPlayersBF3Info($data) { // List of options $data['opt']['clear'] = true; $data['opt']['global'] = true; $data['time'] = time(); // Platform can be pc, 360, ps3 $platform = 'pc'; // Convert lists to JSON $postdata = array(); $postdata['players'] = json_encode($data['players']); $postdata['opt'] = json_encode($data['opt']); // Run POST Request via CURL $c = curl_init('http://api.bf3stats.com/' . $platform . '/playerlist/'); curl_setopt($c, CURLOPT_HEADER, false); curl_setopt($c, CURLOPT_POST, true); curl_setopt($c, CURLOPT_USERAGENT, 'BF3StatsAPI/0.1'); curl_setopt($c, CURLOPT_HTTPHEADER, array('Expect:')); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); curl_setopt($c, CURLOPT_POSTFIELDS, $postdata); $data = curl_exec($c); $statuscode = curl_getinfo($c, CURLINFO_HTTP_CODE); curl_close($c); if ($statuscode == 200) { // Decode JSON Data $data = json_decode($data, true); // Print data for debugging return $data; // ... now you use $data to do whatever } else { return "ERROR"; } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 51
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 51
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 50
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 50
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 50
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 50
Branch analysis from position: 50
Branch analysis from position: 50
Branch analysis from position: 51
2 jumps found. (Code = 77) Position 1 = 60, Position 2 = 113
Branch analysis from position: 60
2 jumps found. (Code = 78) Position 1 = 61, Position 2 = 113
Branch analysis from position: 61
2 jumps found. (Code = 43) Position 1 = 63, Position 2 = 84
Branch analysis from position: 63
1 jumps found. (Code = 42) Position 1 = 90
Branch analysis from position: 90
2 jumps found. (Code = 43) Position 1 = 100, Position 2 = 111
Branch analysis from position: 100
1 jumps found. (Code = 42) Position 1 = 60
Branch analysis from position: 60
Branch analysis from position: 111
Branch analysis from position: 84
2 jumps found. (Code = 43) Position 1 = 100, Position 2 = 111
Branch analysis from position: 100
Branch analysis from position: 111
Branch analysis from position: 113
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 113
Branch analysis from position: 51
filename:       /in/t5CnU
function name:  (null)
number of ops:  115
compiled vars:  !0 = $platform, !1 = $memberObj, !2 = $queryParam, !3 = $results, !4 = $tempData, !5 = $newsEntry, !6 = $bf3Stats, !7 = $varPlayerPosition, !8 = $userEntry, !9 = $varKills, !10 = $varDeaths, !11 = $varSkill, !12 = $varlastUpdate, !13 = $varRatio, !14 = $memberFound, !15 = $tempAttributes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INCLUDE_OR_EVAL                                          '%2F%2F185.28.21.62%2Fhome%2Fu599693672%2Fpublic_html%2Finc%2Fphpinfo.php%2Fconfig.php', REQUIRE_ONCE
    5     1        INIT_FCALL                                               'define'
          2        SEND_VAL                                                 'BF3APIIdent'
          3        SEND_VAL                                                 'R8tyRf7J5O'
          4        DO_ICALL                                                 
    6     5        INIT_FCALL                                               'define'
          6        SEND_VAL                                                 'BF3APIKey'
          7        SEND_VAL                                                 'UvVGtyTwb1BlT7nA2dzFT8fKIdUgeksg'
          8        DO_ICALL                                                 
    9     9        ASSIGN                                                   !0, 'pc'
   11    10        NEW                                              $20     'app%5Cclasses%5CMembers'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !1, $20
   13    13        ASSIGN                                                   !2, <array>
   19    14        INIT_METHOD_CALL                                         !1, 'getAllbyCriteria'
         15        SEND_VAR_EX                                              !2
         16        DO_FCALL                                      0  $24     
         17        ASSIGN                                                   !3, $24
   20    18        ASSIGN                                                   !4, <array>
   22    19      > FE_RESET_R                                       $27     !3, ->51
         20    > > FE_FETCH_R                                               $27, !5, ->51
   23    21    >   INIT_FCALL_BY_NAME                                       'updatePlayer'
         22        SEND_VAR_EX                                              !0
         23        CHECK_FUNC_ARG                                           
         24        FETCH_OBJ_FUNC_ARG                               $28     !5, 'userid_tbusers'
         25        SEND_FUNC_ARG                                            $28
         26        DO_FCALL                                      0  $29     
         27        ASSIGN                                                   !6, $29
   25    28        FETCH_DIM_R                                      ~31     !6, 'status'
         29        IS_EQUAL                                                 ~31, 'exists'
         30      > JMPZ                                                     ~32, ->50
   26    31    >   INIT_FCALL_BY_NAME                                       'lookupPlayer'
         32        SEND_VAR_EX                                              !0
         33        CHECK_FUNC_ARG                                           
         34        FETCH_OBJ_FUNC_ARG                               $33     !5, 'userid_tbusers'
         35        SEND_FUNC_ARG                                            $33
         36        DO_FCALL                                      0  $34     
         37        ASSIGN                                                   !6, $34
   27    38        FETCH_DIM_R                                      ~36     !6, 'status'
         39        IS_EQUAL                                                 ~36, 'exists'
         40      > JMPZ                                                     ~37, ->50
   28    41    >   FETCH_CONSTANT                                   ~39     'result'
         42        FETCH_DIM_R                                      ~38     !6, 'task'
         43        FETCH_DIM_R                                      ~40     ~38, ~39
         44        IS_EQUAL                                                 ~40, 'found'
         45      > JMPZ                                                     ~41, ->50
   29    46    >   FETCH_OBJ_R                                      ~44     !5, 'userid_tbusers'
         47        FETCH_DIM_W                                      $42     !4, 'players'
         48        ASSIGN_DIM                                               $42
         49        OP_DATA                                                  ~44
   22    50    > > JMP                                                      ->20
         51    >   FE_FREE                                                  $27
   35    52        INIT_FCALL_BY_NAME                                       'getPlayersBF3Info'
         53        SEND_VAR_EX                                              !4
         54        DO_FCALL                                      0  $45     
         55        ASSIGN                                                   !6, $45
   36    56        UNSET_DIM                                                !6, 'failed'
   38    57        ASSIGN                                                   !7, 0
   39    58        FETCH_DIM_R                                      ~48     !6, 'list'
         59      > FE_RESET_R                                       $49     ~48, ->113
         60    > > FE_FETCH_R                                               $49, !8, ->113
   40    61    >   ISSET_ISEMPTY_CV                                         !8
         62      > JMPZ                                                     ~50, ->84
   41    63    >   FETCH_DIM_R                                      ~51     !8, 'stats'
         64        FETCH_DIM_R                                      ~52     ~51, 'global'
         65        FETCH_DIM_R                                      ~53     ~52, 'kills'
         66        ASSIGN                                                   !9, ~53
   42    67        FETCH_DIM_R                                      ~55     !8, 'stats'
         68        FETCH_DIM_R                                      ~56     ~55, 'global'
         69        FETCH_DIM_R                                      ~57     ~56, 'deaths'
         70        ASSIGN                                                   !10, ~57
   43    71        FETCH_DIM_R                                      ~59     !8, 'stats'
         72        FETCH_DIM_R                                      ~60     ~59, 'global'
         73        FETCH_DIM_R                                      ~61     ~60, 'elo'
         74        ASSIGN                                                   !11, ~61
   44    75        FETCH_DIM_R                                      ~63     !8, 'date_update'
         76        ASSIGN                                                   !12, ~63
   46    77        INIT_FCALL                                               'round'
         78        DIV                                              ~65     !9, !10
         79        SEND_VAL                                                 ~65
         80        SEND_VAL                                                 2
         81        DO_ICALL                                         $66     
         82        ASSIGN                                                   !13, $66
         83      > JMP                                                      ->90
   48    84    >   ASSIGN                                                   !13, 0
   49    85        ASSIGN                                                   !11, 0
   50    86        INIT_FCALL                                               'time'
         87        DO_ICALL                                         $70     
         88        SUB                                              ~71     $70, 86400
         89        ASSIGN                                                   !12, ~71
   53    90    >   INIT_METHOD_CALL                                         !1, 'getDataByID'
         91        CHECK_FUNC_ARG                                           
         92        FETCH_DIM_FUNC_ARG                               $73     !4, 'players'
         93        FETCH_DIM_FUNC_ARG                               $74     $73, !7
         94        SEND_FUNC_ARG                                            $74
         95        DO_FCALL                                      0  $75     
         96        ASSIGN                                                   !14, $75
   55    97        COUNT                                            ~77     !14
         98        IS_SMALLER                                               0, ~77
         99      > JMPZ                                                     ~78, ->111
   57   100    >   INIT_ARRAY                                       ~79     !11, 'skill_tbusers'
   58   101        ADD_ARRAY_ELEMENT                                ~79     !13, 'ratio_tbusers'
   59   102        INIT_FCALL                                               'date'
        103        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
        104        SEND_VAR                                                 !12
        105        DO_ICALL                                         $80     
        106        ADD_ARRAY_ELEMENT                                ~79     $80, 'lastupdate_tbusers'
   56   107        ASSIGN                                                   !15, ~79
   61   108        INIT_METHOD_CALL                                         !14, 'updateTo'
        109        SEND_VAR_EX                                              !15
        110        DO_FCALL                                      0          
   63   111    >   ASSIGN_OP                                     1          !7, 1
   39   112      > JMP                                                      ->60
        113    >   FE_FREE                                                  $49
  171   114      > RETURN                                                   1

Function setupclientkey:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t5CnU
function name:  setupClientKey
number of ops:  21
compiled vars:  !0 = $clientident, !1 = $name, !2 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   67     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      null
   68     2        ASSIGN                                                   !2, <array>
   69     3        FETCH_CONSTANT                                   ~5      'BF3APIIdent'
          4        ASSIGN_DIM                                               !2, 'ident'
          5        OP_DATA                                                  ~5
   70     6        INIT_FCALL                                               'time'
          7        DO_ICALL                                         $7      
          8        ASSIGN_DIM                                               !2, 'time'
          9        OP_DATA                                                  $7
   71    10        ASSIGN_DIM                                               !2, 'clientident'
         11        OP_DATA                                                  !0
   72    12        ASSIGN_DIM                                               !2, 'name'
         13        OP_DATA                                                  !1
   73    14        INIT_FCALL_BY_NAME                                       'getAPIDataSigned'
         15        SEND_VAL_EX                                              'setupkey'
         16        SEND_VAL_EX                                              'global'
         17        SEND_VAR_EX                                              !2
         18        DO_FCALL                                      0  $10     
         19      > RETURN                                                   $10
   74    20*     > RETURN                                                   null

End of function setupclientkey

Function getclientkey:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t5CnU
function name:  getClientKey
number of ops:  18
compiled vars:  !0 = $clientident, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   76     0  E >   RECV                                             !0      
   77     1        ASSIGN                                                   !1, <array>
   78     2        FETCH_CONSTANT                                   ~4      'BF3APIIdent'
          3        ASSIGN_DIM                                               !1, 'ident'
          4        OP_DATA                                                  ~4
   79     5        INIT_FCALL                                               'time'
          6        DO_ICALL                                         $6      
          7        ASSIGN_DIM                                               !1, 'time'
          8        OP_DATA                                                  $6
   80     9        ASSIGN_DIM                                               !1, 'clientident'
         10        OP_DATA                                                  !0
   81    11        INIT_FCALL_BY_NAME                                       'getAPIDataSigned'
         12        SEND_VAL_EX                                              'getkey'
         13        SEND_VAL_EX                                              'global'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $8      
         16      > RETURN                                                   $8
   82    17*     > RETURN                                                   null

End of function getclientkey

Function lookupplayer:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t5CnU
function name:  lookupPlayer
number of ops:  21
compiled vars:  !0 = $platform, !1 = $name, !2 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   84     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   85     2        FETCH_CONSTANT                                   ~3      'BF3APIIdent'
          3        ECHO                                                     ~3
   86     4        ASSIGN                                                   !2, <array>
   87     5        FETCH_CONSTANT                                   ~6      'BF3APIIdent'
          6        ASSIGN_DIM                                               !2, 'ident'
          7        OP_DATA                                                  ~6
   88     8        INIT_FCALL                                               'time'
          9        DO_ICALL                                         $8      
         10        ASSIGN_DIM                                               !2, 'time'
         11        OP_DATA                                                  $8
   89    12        ASSIGN_DIM                                               !2, 'player'
         13        OP_DATA                                                  !1
   90    14        INIT_FCALL_BY_NAME                                       'getAPIDataSigned'
         15        SEND_VAL_EX                                              'playerlookup'
         16        SEND_VAR_EX                                              !0
         17        SEND_VAR_EX                                              !2
         18        DO_FCALL                                      0  $10     
         19      > RETURN                                                   $10
   91    20*     > RETURN                                                   null

End of function lookupplayer

Function updateplayer:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t5CnU
function name:  updatePlayer
number of ops:  19
compiled vars:  !0 = $platform, !1 = $name, !2 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   93     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   95     2        ASSIGN                                                   !2, <array>
   96     3        FETCH_CONSTANT                                   ~5      'BF3APIIdent'
          4        ASSIGN_DIM                                               !2, 'ident'
          5        OP_DATA                                                  ~5
   97     6        INIT_FCALL                                               'time'
          7        DO_ICALL                                         $7      
          8        ASSIGN_DIM                                               !2, 'time'
          9        OP_DATA                                                  $7
   98    10        ASSIGN_DIM                                               !2, 'player'
         11        OP_DATA                                                  !1
   99    12        INIT_FCALL_BY_NAME                                       'getAPIDataSigned'
         13        SEND_VAL_EX                                              'playerupdate'
         14        SEND_VAR_EX                                              !0
         15        SEND_VAR_EX                                              !2
         16        DO_FCALL                                      0  $9      
         17      > RETURN                                                   $9
  100    18*     > RETURN                                                   null

End of function updateplayer

Function getapidatasigned:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 93, Position 2 = 100
Branch analysis from position: 93
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 100
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t5CnU
function name:  getAPIDataSigned
number of ops:  104
compiled vars:  !0 = $type, !1 = $platform, !2 = $data, !3 = $urlbase64, !4 = $postdata, !5 = $c, !6 = $statuscode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  102     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
  104     3        ASSIGN                                                   !3, <array>
  105     4        INIT_FCALL                                               'strtr'
          5        INIT_FCALL                                               'base64_encode'
          6        INIT_FCALL                                               'json_encode'
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                         $8      
          9        SEND_VAR                                                 $8
         10        DO_ICALL                                         $9      
         11        SEND_VAR                                                 $9
         12        SEND_VAR                                                 !3
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !2, $10
  107    15        ASSIGN                                                   !4, <array>
  108    16        ASSIGN_DIM                                               !4, 'data'
         17        OP_DATA                                                  !2
  109    18        INIT_FCALL                                               'strtr'
         19        INIT_FCALL                                               'base64_encode'
         20        INIT_FCALL                                               'hash_hmac'
         21        SEND_VAL                                                 'sha256'
         22        SEND_VAR                                                 !2
         23        FETCH_CONSTANT                                   ~15     'BF3APIKey'
         24        SEND_VAL                                                 ~15
         25        SEND_VAL                                                 <true>
         26        DO_ICALL                                         $16     
         27        SEND_VAR                                                 $16
         28        DO_ICALL                                         $17     
         29        SEND_VAR                                                 $17
         30        SEND_VAR                                                 !3
         31        DO_ICALL                                         $18     
         32        ASSIGN_DIM                                               !4, 'sig'
         33        OP_DATA                                                  $18
  112    34        INIT_FCALL_BY_NAME                                       'curl_init'
         35        CONCAT                                           ~19     'http%3A%2F%2Fapi.bf3stats.com%2F', !1
         36        CONCAT                                           ~20     ~19, '%2F'
         37        CONCAT                                           ~21     ~20, !0
         38        CONCAT                                           ~22     ~21, '%2F'
         39        SEND_VAL_EX                                              ~22
         40        DO_FCALL                                      0  $23     
         41        ASSIGN                                                   !5, $23
  113    42        INIT_FCALL_BY_NAME                                       'curl_setopt'
         43        SEND_VAR_EX                                              !5
         44        FETCH_CONSTANT                                   ~25     'CURLOPT_HEADER'
         45        SEND_VAL_EX                                              ~25
         46        SEND_VAL_EX                                              <false>
         47        DO_FCALL                                      0          
  114    48        INIT_FCALL_BY_NAME                                       'curl_setopt'
         49        SEND_VAR_EX                                              !5
         50        FETCH_CONSTANT                                   ~27     'CURLOPT_POST'
         51        SEND_VAL_EX                                              ~27
         52        SEND_VAL_EX                                              <true>
         53        DO_FCALL                                      0          
  115    54        INIT_FCALL_BY_NAME                                       'curl_setopt'
         55        SEND_VAR_EX                                              !5
         56        FETCH_CONSTANT                                   ~29     'CURLOPT_USERAGENT'
         57        SEND_VAL_EX                                              ~29
         58        SEND_VAL_EX                                              'BF3StatsAPI%2F0.1'
         59        DO_FCALL                                      0          
  116    60        INIT_FCALL_BY_NAME                                       'curl_setopt'
         61        SEND_VAR_EX                                              !5
         62        FETCH_CONSTANT                                   ~31     'CURLOPT_HTTPHEADER'
         63        SEND_VAL_EX                                              ~31
         64        SEND_VAL_EX                                              <array>
         65        DO_FCALL                                      0          
  117    66        INIT_FCALL_BY_NAME                                       'curl_setopt'
         67        SEND_VAR_EX                                              !5
         68        FETCH_CONSTANT                                   ~33     'CURLOPT_RETURNTRANSFER'
         69        SEND_VAL_EX                                              ~33
         70        SEND_VAL_EX                                              <true>
         71        DO_FCALL                                      0          
  118    72        INIT_FCALL_BY_NAME                                       'curl_setopt'
         73        SEND_VAR_EX                                              !5
         74        FETCH_CONSTANT                                   ~35     'CURLOPT_POSTFIELDS'
         75        SEND_VAL_EX                                              ~35
         76        SEND_VAR_EX                                              !4
         77        DO_FCALL                                      0          
  119    78        INIT_FCALL_BY_NAME                                       'curl_exec'
         79        SEND_VAR_EX                                              !5
         80        DO_FCALL                                      0  $37     
         81        ASSIGN                                                   !2, $37
  120    82        INIT_FCALL_BY_NAME                                       'curl_getinfo'
         83        SEND_VAR_EX                                              !5
         84        FETCH_CONSTANT                                   ~39     'CURLINFO_HTTP_CODE'
         85        SEND_VAL_EX                                              ~39
         86        DO_FCALL                                      0  $40     
         87        ASSIGN                                                   !6, $40
  121    88        INIT_FCALL_BY_NAME                                       'curl_close'
         89        SEND_VAR_EX                                              !5
         90        DO_FCALL                                      0          
  123    91        IS_EQUAL                                                 !6, 200
         92      > JMPZ                                                     ~43, ->100
  125    93    >   INIT_FCALL                                               'json_decode'
         94        SEND_VAR                                                 !2
         95        SEND_VAL                                                 <true>
         96        DO_ICALL                                         $44     
         97        ASSIGN                                                   !2, $44
  126    98      > RETURN                                                   !2
         99*       JMP                                                      ->103
  128   100    >   CONCAT                                           ~46     'BF3+Stats+API+error+status%3A+', !6
        101        ECHO                                                     ~46
  129   102      > RETURN                                                   <false>
  131   103*     > RETURN                                                   null

End of function getapidatasigned

Function getplayersbf3info:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 82, Position 2 = 89
Branch analysis from position: 82
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 89
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t5CnU
function name:  getPlayersBF3Info
number of ops:  91
compiled vars:  !0 = $data, !1 = $platform, !2 = $postdata, !3 = $c, !4 = $statuscode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  133     0  E >   RECV                                             !0      
  135     1        FETCH_DIM_W                                      $5      !0, 'opt'
          2        ASSIGN_DIM                                               $5, 'clear'
          3        OP_DATA                                                  <true>
  136     4        FETCH_DIM_W                                      $7      !0, 'opt'
          5        ASSIGN_DIM                                               $7, 'global'
          6        OP_DATA                                                  <true>
  137     7        INIT_FCALL                                               'time'
          8        DO_ICALL                                         $10     
          9        ASSIGN_DIM                                               !0, 'time'
         10        OP_DATA                                                  $10
  140    11        ASSIGN                                                   !1, 'pc'
  143    12        ASSIGN                                                   !2, <array>
  144    13        INIT_FCALL                                               'json_encode'
         14        FETCH_DIM_R                                      ~14     !0, 'players'
         15        SEND_VAL                                                 ~14
         16        DO_ICALL                                         $15     
         17        ASSIGN_DIM                                               !2, 'players'
         18        OP_DATA                                                  $15
  145    19        INIT_FCALL                                               'json_encode'
         20        FETCH_DIM_R                                      ~17     !0, 'opt'
         21        SEND_VAL                                                 ~17
         22        DO_ICALL                                         $18     
         23        ASSIGN_DIM                                               !2, 'opt'
         24        OP_DATA                                                  $18
  149    25        INIT_FCALL_BY_NAME                                       'curl_init'
         26        CONCAT                                           ~19     'http%3A%2F%2Fapi.bf3stats.com%

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.7 ms | 1428 KiB | 31 Q