3v4l.org

run code in 300+ PHP versions simultaneously
<?php $down = '203'.'98'; //Mbps . Decimal $up = '5'.'97'; //Mbps . Decimal $ping = 8; $server = '3729'; $accuracy = 8; $hash = md5("$ping-$up-$down-297aae72"); $headers = Array( 'POST /api/api.php HTTP/1.1', 'Host: www.speedtest.net', 'User-Agent: DrWhat Speedtest', 'Content-Type: application/x-www-form-urlencoded', 'Origin: http://c.speedtest.net', 'Referer: http://c.speedtest.net/flash/speedtest.swf', 'Cookie: stnetsid=nip873000b9ngm328p6kg8ir12; _g_m=; zdbb=wLZunypbRUOJ0zEsztUTNA; h_zdbb=c0b66e9f2a5b454389d3312cced51334; _ga=GA1.2.707126175.1452494624; _dc_gtm_UA-389482-3=1; _gat_UA-389482-3=1', // change this for history tests 'Connection: Close' ); $post = "startmode=recommendedselect&promo=&upload=$up&accuracy=$accuracy&recommendedserverid=$server&serverid=$server&ping=$ping&hash=$hash&download=$down"; //$post = urlencode($post); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://www.speedtest.net/api/api.php'); curl_setopt($ch, CURLOPT_ENCODING, "" ); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); $data = curl_exec($ch); foreach (explode('&', $data) as $chunk) { $param = explode("=", $chunk); if (urldecode($param[0])== "resultid"){ print 'http://www.speedtest.net/my-result/'.urldecode($param[1]).' Speed test succesful.'; } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 85, Position 2 = 105
Branch analysis from position: 85
2 jumps found. (Code = 78) Position 1 = 86, Position 2 = 105
Branch analysis from position: 86
2 jumps found. (Code = 43) Position 1 = 97, Position 2 = 104
Branch analysis from position: 97
1 jumps found. (Code = 42) Position 1 = 85
Branch analysis from position: 85
Branch analysis from position: 104
Branch analysis from position: 105
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 105
filename:       /in/2GnIH
function name:  (null)
number of ops:  107
compiled vars:  !0 = $down, !1 = $up, !2 = $ping, !3 = $server, !4 = $accuracy, !5 = $hash, !6 = $headers, !7 = $post, !8 = $ch, !9 = $data, !10 = $chunk, !11 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '20398'
    3     1        ASSIGN                                                   !1, '597'
    4     2        ASSIGN                                                   !2, 8
    5     3        ASSIGN                                                   !3, '3729'
    6     4        ASSIGN                                                   !4, 8
    7     5        INIT_FCALL                                               'md5'
          6        ROPE_INIT                                     6  ~18     !2
          7        ROPE_ADD                                      1  ~18     ~18, '-'
          8        ROPE_ADD                                      2  ~18     ~18, !1
          9        ROPE_ADD                                      3  ~18     ~18, '-'
         10        ROPE_ADD                                      4  ~18     ~18, !0
         11        ROPE_END                                      5  ~17     ~18, '-297aae72'
         12        SEND_VAL                                                 ~17
         13        DO_ICALL                                         $21     
         14        ASSIGN                                                   !5, $21
    8    15        ASSIGN                                                   !6, <array>
   18    16        ROPE_INIT                                    14  ~25     'startmode%3Drecommendedselect%26promo%3D%26upload%3D'
         17        ROPE_ADD                                      1  ~25     ~25, !1
         18        ROPE_ADD                                      2  ~25     ~25, '%26accuracy%3D'
         19        ROPE_ADD                                      3  ~25     ~25, !4
         20        ROPE_ADD                                      4  ~25     ~25, '%26recommendedserverid%3D'
         21        ROPE_ADD                                      5  ~25     ~25, !3
         22        ROPE_ADD                                      6  ~25     ~25, '%26serverid%3D'
         23        ROPE_ADD                                      7  ~25     ~25, !3
         24        ROPE_ADD                                      8  ~25     ~25, '%26ping%3D'
         25        ROPE_ADD                                      9  ~25     ~25, !2
         26        ROPE_ADD                                     10  ~25     ~25, '%26hash%3D'
         27        ROPE_ADD                                     11  ~25     ~25, !5
         28        ROPE_ADD                                     12  ~25     ~25, '%26download%3D'
         29        ROPE_END                                     13  ~24     ~25, !0
         30        ASSIGN                                                   !7, ~24
   20    31        INIT_FCALL_BY_NAME                                       'curl_init'
         32        DO_FCALL                                      0  $33     
         33        ASSIGN                                                   !8, $33
   21    34        INIT_FCALL_BY_NAME                                       'curl_setopt'
         35        SEND_VAR_EX                                              !8
         36        FETCH_CONSTANT                                   ~35     'CURLOPT_URL'
         37        SEND_VAL_EX                                              ~35
         38        SEND_VAL_EX                                              'http%3A%2F%2Fwww.speedtest.net%2Fapi%2Fapi.php'
         39        DO_FCALL                                      0          
   22    40        INIT_FCALL_BY_NAME                                       'curl_setopt'
         41        SEND_VAR_EX                                              !8
         42        FETCH_CONSTANT                                   ~37     'CURLOPT_ENCODING'
         43        SEND_VAL_EX                                              ~37
         44        SEND_VAL_EX                                              ''
         45        DO_FCALL                                      0          
   23    46        INIT_FCALL_BY_NAME                                       'curl_setopt'
         47        SEND_VAR_EX                                              !8
         48        FETCH_CONSTANT                                   ~39     'CURLOPT_POST'
         49        SEND_VAL_EX                                              ~39
         50        SEND_VAL_EX                                              1
         51        DO_FCALL                                      0          
   24    52        INIT_FCALL_BY_NAME                                       'curl_setopt'
         53        SEND_VAR_EX                                              !8
         54        FETCH_CONSTANT                                   ~41     'CURLOPT_POSTFIELDS'
         55        SEND_VAL_EX                                              ~41
         56        SEND_VAR_EX                                              !7
         57        DO_FCALL                                      0          
   25    58        INIT_FCALL_BY_NAME                                       'curl_setopt'
         59        SEND_VAR_EX                                              !8
         60        FETCH_CONSTANT                                   ~43     'CURLOPT_HTTPHEADER'
         61        SEND_VAL_EX                                              ~43
         62        SEND_VAR_EX                                              !6
         63        DO_FCALL                                      0          
   26    64        INIT_FCALL_BY_NAME                                       'curl_setopt'
         65        SEND_VAR_EX                                              !8
         66        FETCH_CONSTANT                                   ~45     'CURLOPT_RETURNTRANSFER'
         67        SEND_VAL_EX                                              ~45
         68        SEND_VAL_EX                                              1
         69        DO_FCALL                                      0          
   27    70        INIT_FCALL_BY_NAME                                       'curl_setopt'
         71        SEND_VAR_EX                                              !8
         72        FETCH_CONSTANT                                   ~47     'CURLOPT_FRESH_CONNECT'
         73        SEND_VAL_EX                                              ~47
         74        SEND_VAL_EX                                              1
         75        DO_FCALL                                      0          
   28    76        INIT_FCALL_BY_NAME                                       'curl_exec'
         77        SEND_VAR_EX                                              !8
         78        DO_FCALL                                      0  $49     
         79        ASSIGN                                                   !9, $49
   29    80        INIT_FCALL                                               'explode'
         81        SEND_VAL                                                 '%26'
         82        SEND_VAR                                                 !9
         83        DO_ICALL                                         $51     
         84      > FE_RESET_R                                       $52     $51, ->105
         85    > > FE_FETCH_R                                               $52, !10, ->105
   30    86    >   INIT_FCALL                                               'explode'
         87        SEND_VAL                                                 '%3D'
         88        SEND_VAR                                                 !10
         89        DO_ICALL                                         $53     
         90        ASSIGN                                                   !11, $53
   31    91        INIT_FCALL                                               'urldecode'
         92        FETCH_DIM_R                                      ~55     !11, 0
         93        SEND_VAL                                                 ~55
         94        DO_ICALL                                         $56     
         95        IS_EQUAL                                                 $56, 'resultid'
         96      > JMPZ                                                     ~57, ->104
   32    97    >   INIT_FCALL                                               'urldecode'
         98        FETCH_DIM_R                                      ~58     !11, 1
         99        SEND_VAL                                                 ~58
        100        DO_ICALL                                         $59     
        101        CONCAT                                           ~60     'http%3A%2F%2Fwww.speedtest.net%2Fmy-result%2F', $59
        102        CONCAT                                           ~61     ~60, '+Speed+test+succesful.'
        103        ECHO                                                     ~61
   29   104    > > JMP                                                      ->85
        105    >   FE_FREE                                                  $52
   35   106      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.16 ms | 1396 KiB | 19 Q