3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_web_page( $url,$curl_data ) { $options = array( CURLOPT_RETURNTRANSFER => true, // return web page CURLOPT_HEADER => false, // don't return headers CURLOPT_FOLLOWLOCATION => true, // follow redirects CURLOPT_ENCODING => "", // handle all encodings CURLOPT_USERAGENT => "GoogleBot", // who am i CURLOPT_AUTOREFERER => true, // set referer on redirect CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect CURLOPT_TIMEOUT => 120, // timeout on response CURLOPT_MAXREDIRS => 10, // stop after 10 redirects CURLOPT_POST => 1, // i am sending post data CURLOPT_POSTFIELDS => $curl_data, // this are my post vars CURLOPT_SSL_VERIFYHOST => 0, // don't verify ssl CURLOPT_SSL_VERIFYPEER => false, // CURLOPT_VERBOSE => 1 // ); $ch = curl_init($url); curl_setopt_array($ch,$options); $content = curl_exec($ch); $err = curl_errno($ch); $errmsg = curl_error($ch) ; $header = curl_getinfo($ch); curl_close($ch); // $header['errno'] = $err; // $header['errmsg'] = $errmsg; // $header['content'] = $content; return $header; } //curl -d 'o=55000&d=MO&b=2999&h=&w=&l=' http://ems.posindonesia.co.id/ratepiol.php -o JOGMO2999.txt //asal kiriman : $kodepos_asal = "55000"; //variabel kode negara: $ar_kode_neg = array("AE","AF","AG","AL","AM","AO","AR","AT","AU","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BM","BN","BO","BR","BS","BT","BW","BY","BZ","CA","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CY","CZ","DE","DJ","DK","DM","DZ","EC","EE","EG","ET","FI","FJ","FR","GA","GB","GD","GH","GM","GN","GR","GU","GW","GY","HK","HN","HR","HT","HU","IE","IL","IN","IQ","IR","IT","JM","JO","JP","KE","KG","KH","KP","KR","KW","KZ","LA","LB","LK","LR","LS","LT","LV","LY","MA","MD","MG","ML","MM","MN","MO","MR","MT","MU","MV","MX","MY","MZ","NA","NC","NE","NF","NL","NO","NP","NR","NZ","OM","PE","PG","PH","PK","PL","PT","PY","QA","RO","RU","RW","SA","SB","SC","SD","SE","SG","SI","SK","SL","SN","SO","SV","SY","SZ","TD","TG","TH","TJ","TL","TM","TN","TO","TR","TV","TW","TZ","UA","UG","US","UY","UZ","VA","VN","WS","YE","YU","ZA","ZM"); //variabel kelompok berat kiriman: $ar_kat_berat = array("250","500","1000","1500","2000","250","500","1000","1500","2000","2500","3000","3500","4000","4500","5000","5500","6000","6500","7000","7500","8000","8500","9000","9500","10000"); $ar_kode_neg = array("AE"); $ar_kat_berat = array("250"); //untuk setiap negara foreach($ar_kode_neg as $kn){ foreach($ar_kat_berat as $kb){ //print $kn."-".$kb; //$commanline = "curl -d 'o=55000&d=".$kn."&b=".$kb."&h=&w=&l=' http://ems.posindonesia.co.id/ratepiol.php -o JOG-".$kn."-".$kb.".txt"; //print $commanline; $curl_data = "o=55000&d=".$kn."&b=".$kb."&h=&w=&l="; $url = "http://ems.posindonesia.co.id/ratepiol.php"; $response = get_web_page($url,$curl_data); print '<pre>'; print_r($response); } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 27
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 27
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 25
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 25
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 25
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/IQOA3
function name:  (null)
number of ops:  29
compiled vars:  !0 = $kodepos_asal, !1 = $ar_kode_neg, !2 = $ar_kat_berat, !3 = $kn, !4 = $kb, !5 = $curl_data, !6 = $url, !7 = $response
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   ASSIGN                                                   !0, '55000'
   42     1        ASSIGN                                                   !1, <array>
   46     2        ASSIGN                                                   !2, <array>
   49     3        ASSIGN                                                   !1, <array>
   50     4        ASSIGN                                                   !2, <array>
   52     5      > FE_RESET_R                                       $13     !1, ->27
          6    > > FE_FETCH_R                                               $13, !3, ->27
   53     7    > > FE_RESET_R                                       $14     !2, ->25
          8    > > FE_FETCH_R                                               $14, !4, ->25
   57     9    >   CONCAT                                           ~15     'o%3D55000%26d%3D', !3
         10        CONCAT                                           ~16     ~15, '%26b%3D'
         11        CONCAT                                           ~17     ~16, !4
         12        CONCAT                                           ~18     ~17, '%26h%3D%26w%3D%26l%3D'
         13        ASSIGN                                                   !5, ~18
   58    14        ASSIGN                                                   !6, 'http%3A%2F%2Fems.posindonesia.co.id%2Fratepiol.php'
   59    15        INIT_FCALL                                               'get_web_page'
         16        SEND_VAR                                                 !6
         17        SEND_VAR                                                 !5
         18        DO_FCALL                                      0  $21     
         19        ASSIGN                                                   !7, $21
   61    20        ECHO                                                     '%3Cpre%3E'
   62    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !7
         23        DO_ICALL                                                 
   53    24      > JMP                                                      ->8
         25    >   FE_FREE                                                  $14
   52    26      > JMP                                                      ->6
         27    >   FE_FREE                                                  $13
   67    28      > RETURN                                                   1

Function get_web_page:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IQOA3
function name:  get_web_page
number of ops:  60
compiled vars:  !0 = $url, !1 = $curl_data, !2 = $options, !3 = $ch, !4 = $content, !5 = $err, !6 = $errmsg, !7 = $header
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        FETCH_CONSTANT                                   ~8      'CURLOPT_RETURNTRANSFER'
          3        INIT_ARRAY                                       ~9      <true>, ~8
    6     4        FETCH_CONSTANT                                   ~10     'CURLOPT_HEADER'
    5     5        ADD_ARRAY_ELEMENT                                ~9      <false>, ~10
    7     6        FETCH_CONSTANT                                   ~11     'CURLOPT_FOLLOWLOCATION'
    5     7        ADD_ARRAY_ELEMENT                                ~9      <true>, ~11
    8     8        FETCH_CONSTANT                                   ~12     'CURLOPT_ENCODING'
          9        ADD_ARRAY_ELEMENT                                ~9      '', ~12
    9    10        FETCH_CONSTANT                                   ~13     'CURLOPT_USERAGENT'
         11        ADD_ARRAY_ELEMENT                                ~9      'GoogleBot', ~13
   10    12        FETCH_CONSTANT                                   ~14     'CURLOPT_AUTOREFERER'
    5    13        ADD_ARRAY_ELEMENT                                ~9      <true>, ~14
   11    14        FETCH_CONSTANT                                   ~15     'CURLOPT_CONNECTTIMEOUT'
         15        ADD_ARRAY_ELEMENT                                ~9      120, ~15
   12    16        FETCH_CONSTANT                                   ~16     'CURLOPT_TIMEOUT'
         17        ADD_ARRAY_ELEMENT                                ~9      120, ~16
   13    18        FETCH_CONSTANT                                   ~17     'CURLOPT_MAXREDIRS'
         19        ADD_ARRAY_ELEMENT                                ~9      10, ~17
   14    20        FETCH_CONSTANT                                   ~18     'CURLOPT_POST'
         21        ADD_ARRAY_ELEMENT                                ~9      1, ~18
   15    22        FETCH_CONSTANT                                   ~19     'CURLOPT_POSTFIELDS'
         23        ADD_ARRAY_ELEMENT                                ~9      !1, ~19
   16    24        FETCH_CONSTANT                                   ~20     'CURLOPT_SSL_VERIFYHOST'
         25        ADD_ARRAY_ELEMENT                                ~9      0, ~20
   17    26        FETCH_CONSTANT                                   ~21     'CURLOPT_SSL_VERIFYPEER'
    5    27        ADD_ARRAY_ELEMENT                                ~9      <false>, ~21
   18    28        FETCH_CONSTANT                                   ~22     'CURLOPT_VERBOSE'
         29        ADD_ARRAY_ELEMENT                                ~9      1, ~22
    4    30        ASSIGN                                                   !2, ~9
   21    31        INIT_FCALL_BY_NAME                                       'curl_init'
         32        SEND_VAR_EX                                              !0
         33        DO_FCALL                                      0  $24     
         34        ASSIGN                                                   !3, $24
   22    35        INIT_FCALL_BY_NAME                                       'curl_setopt_array'
         36        SEND_VAR_EX                                              !3
         37        SEND_VAR_EX                                              !2
         38        DO_FCALL                                      0          
   23    39        INIT_FCALL_BY_NAME                                       'curl_exec'
         40        SEND_VAR_EX                                              !3
         41        DO_FCALL                                      0  $27     
         42        ASSIGN                                                   !4, $27
   24    43        INIT_FCALL_BY_NAME                                       'curl_errno'
         44        SEND_VAR_EX                                              !3
         45        DO_FCALL                                      0  $29     
         46        ASSIGN                                                   !5, $29
   25    47        INIT_FCALL_BY_NAME                                       'curl_error'
         48        SEND_VAR_EX                                              !3
         49        DO_FCALL                                      0  $31     
         50        ASSIGN                                                   !6, $31
   26    51        INIT_FCALL_BY_NAME                                       'curl_getinfo'
         52        SEND_VAR_EX                                              !3
         53        DO_FCALL                                      0  $33     
         54        ASSIGN                                                   !7, $33
   27    55        INIT_FCALL_BY_NAME                                       'curl_close'
         56        SEND_VAR_EX                                              !3
         57        DO_FCALL                                      0          
   32    58      > RETURN                                                   !7
   33    59*     > RETURN                                                   null

End of function get_web_page

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.1 ms | 1407 KiB | 16 Q