3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://api.hackex.net/v1/auth'; //extract data from the post extract($_POST); //set POST variables $url = 'http://api.hackex.net/v1/auth'; $fields = array( 'apikey' => "nue1214xn", 'email' => 'cuorefolle@gmail.com', 'password' => 'fenomeno' ); //url-ify the data for the POST foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } rtrim($fields_string, '&'); //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_POST, count($fields)); curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); //execute post $result = curl_exec($ch); echo $result; //close connection curl_close($ch);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/it7hP
function name:  (null)
number of ops:  51
compiled vars:  !0 = $url, !1 = $fields, !2 = $value, !3 = $key, !4 = $fields_string, !5 = $ch, !6 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fapi.hackex.net%2Fv1%2Fauth'
    4     1        INIT_FCALL                                               'extract'
          2        FETCH_W                      global              $8      '_POST'
          3        SEND_REF                                                 $8
          4        DO_ICALL                                                 
    7     5        ASSIGN                                                   !0, 'http%3A%2F%2Fapi.hackex.net%2Fv1%2Fauth'
    8     6        ASSIGN                                                   !1, <array>
   15     7      > FE_RESET_R                                       $12     !1, ->15
          8    > > FE_FETCH_R                                       ~13     $12, !2, ->15
          9    >   ASSIGN                                                   !3, ~13
         10        CONCAT                                           ~15     !3, '%3D'
         11        CONCAT                                           ~16     ~15, !2
         12        CONCAT                                           ~17     ~16, '%26'
         13        ASSIGN_OP                                     8          !4, ~17
         14      > JMP                                                      ->8
         15    >   FE_FREE                                                  $12
   16    16        INIT_FCALL                                               'rtrim'
         17        SEND_VAR                                                 !4
         18        SEND_VAL                                                 '%26'
         19        DO_ICALL                                                 
   19    20        INIT_FCALL_BY_NAME                                       'curl_init'
         21        DO_FCALL                                      0  $20     
         22        ASSIGN                                                   !5, $20
   22    23        INIT_FCALL_BY_NAME                                       'curl_setopt'
         24        SEND_VAR_EX                                              !5
         25        FETCH_CONSTANT                                   ~22     'CURLOPT_URL'
         26        SEND_VAL_EX                                              ~22
         27        SEND_VAR_EX                                              !0
         28        DO_FCALL                                      0          
   23    29        INIT_FCALL_BY_NAME                                       'curl_setopt'
         30        SEND_VAR_EX                                              !5
         31        FETCH_CONSTANT                                   ~24     'CURLOPT_POST'
         32        SEND_VAL_EX                                              ~24
         33        COUNT                                            ~25     !1
         34        SEND_VAL_EX                                              ~25
         35        DO_FCALL                                      0          
   24    36        INIT_FCALL_BY_NAME                                       'curl_setopt'
         37        SEND_VAR_EX                                              !5
         38        FETCH_CONSTANT                                   ~27     'CURLOPT_POSTFIELDS'
         39        SEND_VAL_EX                                              ~27
         40        SEND_VAR_EX                                              !4
         41        DO_FCALL                                      0          
   27    42        INIT_FCALL_BY_NAME                                       'curl_exec'
         43        SEND_VAR_EX                                              !5
         44        DO_FCALL                                      0  $29     
         45        ASSIGN                                                   !6, $29
   28    46        ECHO                                                     !6
   31    47        INIT_FCALL_BY_NAME                                       'curl_close'
         48        SEND_VAR_EX                                              !5
         49        DO_FCALL                                      0          
         50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.59 ms | 1392 KiB | 17 Q