3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = ' http://err.spring-tns.net/j0=,,,;+,cp=r2/r2_mp3/%3Fsaade%3D22%26paev%3D2014-04-28+url=http%3A//r2.err.ee/player_m%3Fsaade%3D22%26paev%3D2014-04-28;;;?lt=hupr4hqm&x=1536x864x24'; // disguises the curl using fake headers and a fake user agent. function disguise_curl($url) { $curl = curl_init(); // Setup headers - I used the same headers from Firefox version 2.0.0.6 // below was split up because php.net said the line was too long. :/ $header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,"; $header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"; $header[] = "Cache-Control: max-age=0"; $header[] = "Connection: keep-alive"; $header[] = "Keep-Alive: 300"; $header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; $header[] = "Accept-Language: en-us,en;q=0.5"; $header[] = "Pragma: "; // browsers keep this blank. curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36x)'); curl_setopt($curl, CURLOPT_HTTPHEADER, $header); curl_setopt($curl, CURLOPT_REFERER, 'http://r2.err.ee/player_m?saade=22&paev=2014-04-28'); curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate'); curl_setopt($curl, CURLOPT_AUTOREFERER, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_TIMEOUT, 10); $html = curl_exec($curl); // execute the curl command curl_close($curl); // close the connection return $html; // and finally, return $html } // uses the function and displays the text off the website $text = disguise_curl($url); echo $text; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PcMAR
function name:  (null)
number of ops:  7
compiled vars:  !0 = $url, !1 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '+http%3A%2F%2Ferr.spring-tns.net%2Fj0%3D%2C%2C%2C%3B%2B%2Ccp%3Dr2%2Fr2_mp3%2F%253Fsaade%253D22%2526paev%253D2014-04-28%2Burl%3Dhttp%253A%2F%2Fr2.err.ee%2Fplayer_m%253Fsaade%253D22%2526paev%253D2014-04-28%3B%3B%3B%3Flt%3Dhupr4hqm%26x%3D1536x864x24'
   37     1        INIT_FCALL                                               'disguise_curl'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !1, $3
   38     5        ECHO                                                     !1
   39     6      > RETURN                                                   1

Function disguise_curl:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PcMAR
function name:  disguise_curl
number of ops:  77
compiled vars:  !0 = $url, !1 = $curl, !2 = $header, !3 = $html
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        INIT_FCALL_BY_NAME                                       'curl_init'
          2        DO_FCALL                                      0  $4      
          3        ASSIGN                                                   !1, $4
   12     4        ASSIGN_DIM                                               !2, 0
          5        OP_DATA                                                  'Accept%3A+text%2Fxml%2Capplication%2Fxml%2Capplication%2Fxhtml%2Bxml%2C'
   13     6        ASSIGN_DIM_OP                .=               8          !2, 0
          7        OP_DATA                                                  'text%2Fhtml%3Bq%3D0.9%2Ctext%2Fplain%3Bq%3D0.8%2Cimage%2Fpng%2C%2A%2F%2A%3Bq%3D0.5'
   14     8        ASSIGN_DIM                                               !2
          9        OP_DATA                                                  'Cache-Control%3A+max-age%3D0'
   15    10        ASSIGN_DIM                                               !2
         11        OP_DATA                                                  'Connection%3A+keep-alive'
   16    12        ASSIGN_DIM                                               !2
         13        OP_DATA                                                  'Keep-Alive%3A+300'
   17    14        ASSIGN_DIM                                               !2
         15        OP_DATA                                                  'Accept-Charset%3A+ISO-8859-1%2Cutf-8%3Bq%3D0.7%2C%2A%3Bq%3D0.7'
   18    16        ASSIGN_DIM                                               !2
         17        OP_DATA                                                  'Accept-Language%3A+en-us%2Cen%3Bq%3D0.5'
   19    18        ASSIGN_DIM                                               !2
         19        OP_DATA                                                  'Pragma%3A+'
   21    20        INIT_FCALL_BY_NAME                                       'curl_setopt'
         21        SEND_VAR_EX                                              !1
         22        FETCH_CONSTANT                                   ~14     'CURLOPT_URL'
         23        SEND_VAL_EX                                              ~14
         24        SEND_VAR_EX                                              !0
         25        DO_FCALL                                      0          
   22    26        INIT_FCALL_BY_NAME                                       'curl_setopt'
         27        SEND_VAR_EX                                              !1
         28        FETCH_CONSTANT                                   ~16     'CURLOPT_USERAGENT'
         29        SEND_VAL_EX                                              ~16
         30        SEND_VAL_EX                                              'Mozilla%2F5.0+%28Windows+NT+6.3%3B+WOW64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F34.0.1847.131+Safari%2F537.36x%29'
         31        DO_FCALL                                      0          
   23    32        INIT_FCALL_BY_NAME                                       'curl_setopt'
         33        SEND_VAR_EX                                              !1
         34        FETCH_CONSTANT                                   ~18     'CURLOPT_HTTPHEADER'
         35        SEND_VAL_EX                                              ~18
         36        SEND_VAR_EX                                              !2
         37        DO_FCALL                                      0          
   24    38        INIT_FCALL_BY_NAME                                       'curl_setopt'
         39        SEND_VAR_EX                                              !1
         40        FETCH_CONSTANT                                   ~20     'CURLOPT_REFERER'
         41        SEND_VAL_EX                                              ~20
         42        SEND_VAL_EX                                              'http%3A%2F%2Fr2.err.ee%2Fplayer_m%3Fsaade%3D22%26paev%3D2014-04-28'
         43        DO_FCALL                                      0          
   25    44        INIT_FCALL_BY_NAME                                       'curl_setopt'
         45        SEND_VAR_EX                                              !1
         46        FETCH_CONSTANT                                   ~22     'CURLOPT_ENCODING'
         47        SEND_VAL_EX                                              ~22
         48        SEND_VAL_EX                                              'gzip%2Cdeflate'
         49        DO_FCALL                                      0          
   26    50        INIT_FCALL_BY_NAME                                       'curl_setopt'
         51        SEND_VAR_EX                                              !1
         52        FETCH_CONSTANT                                   ~24     'CURLOPT_AUTOREFERER'
         53        SEND_VAL_EX                                              ~24
         54        SEND_VAL_EX                                              <true>
         55        DO_FCALL                                      0          
   27    56        INIT_FCALL_BY_NAME                                       'curl_setopt'
         57        SEND_VAR_EX                                              !1
         58        FETCH_CONSTANT                                   ~26     'CURLOPT_RETURNTRANSFER'
         59        SEND_VAL_EX                                              ~26
         60        SEND_VAL_EX                                              1
         61        DO_FCALL                                      0          
   28    62        INIT_FCALL_BY_NAME                                       'curl_setopt'
         63        SEND_VAR_EX                                              !1
         64        FETCH_CONSTANT                                   ~28     'CURLOPT_TIMEOUT'
         65        SEND_VAL_EX                                              ~28
         66        SEND_VAL_EX                                              10
         67        DO_FCALL                                      0          
   30    68        INIT_FCALL_BY_NAME                                       'curl_exec'
         69        SEND_VAR_EX                                              !1
         70        DO_FCALL                                      0  $30     
         71        ASSIGN                                                   !3, $30
   31    72        INIT_FCALL_BY_NAME                                       'curl_close'
         73        SEND_VAR_EX                                              !1
         74        DO_FCALL                                      0          
   33    75      > RETURN                                                   !3
   34    76*     > RETURN                                                   null

End of function disguise_curl

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.37 ms | 1407 KiB | 14 Q