3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); header ("Content-type: text/xml;"); echo '<?xml version="1.0" encoding="utf-8"?>'."\r\n"; echo '<items>'; $token = '603a0a066a8d71427114723059ef5a17fa1068b53d15a078edbe3ffca357e93c965b8ab84bc4c862c2224'; if(isset($_REQUEST['search'])){ if(isset($_REQUEST['offset'])) if(isset($_REQUEST['hd'])) $url = 'http://api.vk.com/method/video.search.xml?q='.$_REQUEST['search'].'&count=200&sort=1'.$_REQUEST['hd'].'&adult=1'.$_REQUEST['offset'].'&access_token='.$token; $html = simpleXML_load_file($url,"SimpleXMLElement",LIBXML_NOCDATA); foreach ($html->video as $item) { $play = $item-> player; $title = $item-> title; $img = $item-> image_medium; echo '<channel><title>'.$title.'</title><description><![CDATA[<table><tr><td style="vertical-align: top"><img src="'.$img.'" height="408" width="410"/><h1></h1></td></tr></table> ]]></description><stream_url><![CDATA['.$play.'&autoplay=1]]></stream_url> </channel>'; }} print("</items>"); $name = $_REQUEST['search']; $page = ob_get_contents(); ob_end_flush(); $fp = fopen("$name.xml","w"); fwrite($fp,$page); fclose($fp); $ftp_server="ftp.byethost10.com"; $ftp_user_name="b10_14110070"; $ftp_user_pass="roja1234"; $file = "$name.xml";//tobe uploaded $remote_file = "/htdocs/s/$name.xml"; // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // upload a file if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) { echo "successfully uploaded $file\n"; } else { echo "There was a problem while uploading $file\n"; } // close the connection ftp_close($conn_id); ?> <? $conexion = mysql_connect($mysql_host, $mysql_usuario, $mysql_password, true); $mysql_usuario = 'b10_14110070'; $mysql_password = 'roja1234'; $mysql_host = 'sql207.byethost10.com'; $mysql_database = 'b10_14110070_iptv'; //Seleccionamos la base datos y la conexión. mysql_select_db($mysql_database, $conexion); //Verificamos que no hay ningún error en la conexión if (!$conexion) die('No pudo conectarse: '.mysql_error()); else { //Preparamos la consulta $title = '$name'; $logo_30x30 ='http://www.visual8.co.uk/wp-content/uploads/2013/10/Video-Icon.jpg' ; $description = '$name'; $playlist_url = '$remote_file'; $consulta = "INSERT INTO testme (title, logo_30x30, description, playlist_url)"; $consulta .= "VALUES ('$title', '$logo_30x30', '$description', '$playlist_url')"; //Ejecutamos la consulta $resultado = mysql_query($consulta, $conexion) or die(mysql_error()); echo "<b>ARCHIVO REGISTRADO</b><br><b>nombre:</b> ".$title.", \n <br> <b>logo_30x30:</b> ".$logo_30x30.", \n <br> <b>description:</b> ".$description.", \n <br><br> <b>playlist_url:</b> ".$playlist_url.", \n <br><br>"; } //Cerramos la conexión mysql_close($conexion); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 55
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 31
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 31
Branch analysis from position: 17
2 jumps found. (Code = 77) Position 1 = 39, Position 2 = 54
Branch analysis from position: 39
2 jumps found. (Code = 78) Position 1 = 40, Position 2 = 54
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
Branch analysis from position: 54
2 jumps found. (Code = 43) Position 1 = 106, Position 2 = 111
Branch analysis from position: 106
1 jumps found. (Code = 42) Position 1 = 115
Branch analysis from position: 115
2 jumps found. (Code = 43) Position 1 = 135, Position 2 = 140
Branch analysis from position: 135
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 140
2 jumps found. (Code = 47) Position 1 = 161, Position 2 = 165
Branch analysis from position: 161
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 165
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 111
2 jumps found. (Code = 43) Position 1 = 135, Position 2 = 140
Branch analysis from position: 135
Branch analysis from position: 140
Branch analysis from position: 54
Branch analysis from position: 31
Branch analysis from position: 31
Branch analysis from position: 55
filename:       /in/KrnTL
function name:  (null)
number of ops:  178
compiled vars:  !0 = $token, !1 = $url, !2 = $html, !3 = $item, !4 = $play, !5 = $title, !6 = $img, !7 = $name, !8 = $page, !9 = $fp, !10 = $ftp_server, !11 = $ftp_user_name, !12 = $ftp_user_pass, !13 = $file, !14 = $remote_file, !15 = $conn_id, !16 = $login_result, !17 = $conexion, !18 = $mysql_host, !19 = $mysql_usuario, !20 = $mysql_password, !21 = $mysql_database, !22 = $logo_30x30, !23 = $description, !24 = $playlist_url, !25 = $consulta, !26 = $resultado
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'ob_start'
          1        DO_ICALL                                                 
    3     2        INIT_FCALL                                               'header'
          3        SEND_VAL                                                 'Content-type%3A+text%2Fxml%3B'
          4        DO_ICALL                                                 
    4     5        ECHO                                                     '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22utf-8%22%3F%3E%0D%0A'
    5     6        ECHO                                                     '%3Citems%3E'
    6     7        ASSIGN                                                   !0, '603a0a066a8d71427114723059ef5a17fa1068b53d15a078edbe3ffca357e93c965b8ab84bc4c862c2224'
    7     8        FETCH_IS                                         ~30     '_REQUEST'
          9        ISSET_ISEMPTY_DIM_OBJ                         0          ~30, 'search'
         10      > JMPZ                                                     ~31, ->55
    8    11    >   FETCH_IS                                         ~32     '_REQUEST'
         12        ISSET_ISEMPTY_DIM_OBJ                         0          ~32, 'offset'
         13      > JMPZ                                                     ~33, ->31
    9    14    >   FETCH_IS                                         ~34     '_REQUEST'
         15        ISSET_ISEMPTY_DIM_OBJ                         0          ~34, 'hd'
         16      > JMPZ                                                     ~35, ->31
   10    17    >   FETCH_R                      global              ~36     '_REQUEST'
         18        FETCH_DIM_R                                      ~37     ~36, 'search'
         19        CONCAT                                           ~38     'http%3A%2F%2Fapi.vk.com%2Fmethod%2Fvideo.search.xml%3Fq%3D', ~37
         20        CONCAT                                           ~39     ~38, '%26count%3D200%26sort%3D1'
         21        FETCH_R                      global              ~40     '_REQUEST'
         22        FETCH_DIM_R                                      ~41     ~40, 'hd'
         23        CONCAT                                           ~42     ~39, ~41
         24        CONCAT                                           ~43     ~42, '%26adult%3D1'
         25        FETCH_R                      global              ~44     '_REQUEST'
         26        FETCH_DIM_R                                      ~45     ~44, 'offset'
         27        CONCAT                                           ~46     ~43, ~45
         28        CONCAT                                           ~47     ~46, '%26access_token%3D'
         29        CONCAT                                           ~48     ~47, !0
         30        ASSIGN                                                   !1, ~48
   11    31    >   INIT_FCALL                                               'simplexml_load_file'
         32        SEND_VAR                                                 !1
         33        SEND_VAL                                                 'SimpleXMLElement'
         34        SEND_VAL                                                 16384
         35        DO_ICALL                                         $50     
         36        ASSIGN                                                   !2, $50
   12    37        FETCH_OBJ_R                                      ~52     !2, 'video'
         38      > FE_RESET_R                                       $53     ~52, ->54
         39    > > FE_FETCH_R                                               $53, !3, ->54
   13    40    >   FETCH_OBJ_R                                      ~54     !3, 'player'
         41        ASSIGN                                                   !4, ~54
   14    42        FETCH_OBJ_R                                      ~56     !3, 'title'
         43        ASSIGN                                                   !5, ~56
   15    44        FETCH_OBJ_R                                      ~58     !3, 'image_medium'
         45        ASSIGN                                                   !6, ~58
   16    46        CONCAT                                           ~60     '%3Cchannel%3E%3Ctitle%3E', !5
         47        CONCAT                                           ~61     ~60, '%3C%2Ftitle%3E%3Cdescription%3E%3C%21%5BCDATA%5B%3Ctable%3E%3Ctr%3E%3Ctd+style%3D%22vertical-align%3A+top%22%3E%3Cimg+src%3D%22'
         48        CONCAT                                           ~62     ~61, !6
         49        CONCAT                                           ~63     ~62, '%22+height%3D%22408%22+width%3D%22410%22%2F%3E%3Ch1%3E%3C%2Fh1%3E%3C%2Ftd%3E%3C%2Ftr%3E%3C%2Ftable%3E%0A%5D%5D%3E%3C%2Fdescription%3E%3Cstream_url%3E%3C%21%5BCDATA%5B'
   17    50        CONCAT                                           ~64     ~63, !4
         51        CONCAT                                           ~65     ~64, '%26autoplay%3D1%5D%5D%3E%3C%2Fstream_url%3E%0A%3C%2Fchannel%3E'
         52        ECHO                                                     ~65
   12    53      > JMP                                                      ->39
         54    >   FE_FREE                                                  $53
   20    55    >   ECHO                                                     '%3C%2Fitems%3E'
   21    56        FETCH_R                      global              ~66     '_REQUEST'
         57        FETCH_DIM_R                                      ~67     ~66, 'search'
         58        ASSIGN                                                   !7, ~67
   22    59        INIT_FCALL                                               'ob_get_contents'
         60        DO_ICALL                                         $69     
         61        ASSIGN                                                   !8, $69
   23    62        INIT_FCALL                                               'ob_end_flush'
         63        DO_ICALL                                                 
   24    64        INIT_FCALL                                               'fopen'
         65        NOP                                                      
         66        FAST_CONCAT                                      ~72     !7, '.xml'
         67        SEND_VAL                                                 ~72
         68        SEND_VAL                                                 'w'
         69        DO_ICALL                                         $73     
         70        ASSIGN                                                   !9, $73
   25    71        INIT_FCALL                                               'fwrite'
         72        SEND_VAR                                                 !9
         73        SEND_VAR                                                 !8
         74        DO_ICALL                                                 
   26    75        INIT_FCALL                                               'fclose'
         76        SEND_VAR                                                 !9
         77        DO_ICALL                                                 
   28    78        ASSIGN                                                   !10, 'ftp.byethost10.com'
   29    79        ASSIGN                                                   !11, 'b10_14110070'
   30    80        ASSIGN                                                   !12, 'roja1234'
   31    81        NOP                                                      
         82        FAST_CONCAT                                      ~80     !7, '.xml'
         83        ASSIGN                                                   !13, ~80
   32    84        ROPE_INIT                                     3  ~83     '%2Fhtdocs%2Fs%2F'
         85        ROPE_ADD                                      1  ~83     ~83, !7
         86        ROPE_END                                      2  ~82     ~83, '.xml'
         87        ASSIGN                                                   !14, ~82
   35    88        INIT_FCALL_BY_NAME                                       'ftp_connect'
         89        SEND_VAR_EX                                              !10
         90        DO_FCALL                                      0  $86     
         91        ASSIGN                                                   !15, $86
   38    92        INIT_FCALL_BY_NAME                                       'ftp_login'
         93        SEND_VAR_EX                                              !15
         94        SEND_VAR_EX                                              !11
         95        SEND_VAR_EX                                              !12
         96        DO_FCALL                                      0  $88     
         97        ASSIGN                                                   !16, $88
   41    98        INIT_FCALL_BY_NAME                                       'ftp_put'
         99        SEND_VAR_EX                                              !15
        100        SEND_VAR_EX                                              !14
        101        SEND_VAR_EX                                              !13
        102        FETCH_CONSTANT                                   ~90     'FTP_ASCII'
        103        SEND_VAL_EX                                              ~90
        104        DO_FCALL                                      0  $91     
        105      > JMPZ                                                     $91, ->111
   42   106    >   ROPE_INIT                                     3  ~93     'successfully+uploaded+'
        107        ROPE_ADD                                      1  ~93     ~93, !13
        108        ROPE_END                                      2  ~92     ~93, '%0A'
        109        ECHO                                                     ~92
        110      > JMP                                                      ->115
   45   111    >   ROPE_INIT                                     3  ~96     'There+was+a+problem+while+uploading+'
        112        ROPE_ADD                                      1  ~96     ~96, !13
        113        ROPE_END                                      2  ~95     ~96, '%0A'
        114        ECHO                                                     ~95
   49   115    >   INIT_FCALL_BY_NAME                                       'ftp_close'
        116        SEND_VAR_EX                                              !15
        117        DO_FCALL                                      0          
   52   118        INIT_FCALL_BY_NAME                                       'mysql_connect'
        119        SEND_VAR_EX                                              !18
        120        SEND_VAR_EX                                              !19
        121        SEND_VAR_EX                                              !20
        122        SEND_VAL_EX                                              <true>
        123        DO_FCALL                                      0  $99     
        124        ASSIGN                                                   !17, $99
   54   125        ASSIGN                                                   !19, 'b10_14110070'
   56   126        ASSIGN                                                   !20, 'roja1234'
   58   127        ASSIGN                                                   !18, 'sql207.byethost10.com'
   60   128        ASSIGN                                                   !21, 'b10_14110070_iptv'
   64   129        INIT_FCALL_BY_NAME                                       'mysql_select_db'
        130        SEND_VAR_EX                                              !21
        131        SEND_VAR_EX                                              !17
        132        DO_FCALL                                      0          
   69   133        BOOL_NOT                                         ~106    !17
        134      > JMPZ                                                     ~106, ->140
   71   135    >   INIT_FCALL_BY_NAME                                       'mysql_error'
        136        DO_FCALL                                      0  $107    
        137        CONCAT                                           ~108    'No+pudo+conectarse%3A+', $107
        138      > EXIT                                                     ~108
        139*       JMP                                                      ->174
   78   140    >   ASSIGN                                                   !5, '%24name'
   79   141        ASSIGN                                                   !22, 'http%3A%2F%2Fwww.visual8.co.uk%2Fwp-content%2Fuploads%2F2013%2F10%2FVideo-Icon.jpg'
   80   142        ASSIGN                                                   !23, '%24name'
   81   143        ASSIGN                                                   !24, '%24remote_file'
   83   144        ASSIGN                                                   !25, 'INSERT+INTO+testme+%28title%2C+logo_30x30%2C+description%2C+playlist_url%29'
   84   145        ROPE_INIT                                     9  ~115    'VALUES+%28%27'
        146        ROPE_ADD                                      1  ~115    ~115, !5
        147        ROPE_ADD                                      2  ~115    ~115, '%27%2C+%27'
        148        ROPE_ADD                                      3  ~115    ~115, !22
        149        ROPE_ADD                                      4  ~115    ~115, '%27%2C+%27'
        150        ROPE_ADD                                      5  ~115    ~115, !23
        151        ROPE_ADD                                      6  ~115    ~115, '%27%2C+%27'
        152        ROPE_ADD                                      7  ~115    ~115, !24
        153        ROPE_END                                      8  ~114    ~115, '%27%29'
        154        ASSIGN_OP                                     8          !25, ~114
   87   155        INIT_FCALL_BY_NAME                                       'mysql_query'
        156        SEND_VAR_EX                                              !25
        157        SEND_VAR_EX                                              !17
        158        DO_FCALL                                      0  $121    
        159        ASSIGN                                           ~122    !26, $121
        160      > JMPNZ_EX                                         ~122    ~122, ->165
        161    >   INIT_FCALL_BY_NAME                                       'mysql_error'
        162        DO_FCALL                                      0  $123    
        163      > EXIT                                                     $123
        164*       BOOL                                             ~122    <true>
   91   165    >   CONCAT                                           ~124    '%3Cb%3EARCHIVO+REGISTRADO%3C%2Fb%3E%3Cbr%3E%3Cb%3Enombre%3A%3C%2Fb%3E+', !5
        166        CONCAT                                           ~125    ~124, '%2C+%0A%0A%3Cbr%3E%0A++++++%3Cb%3Elogo_30x30%3A%3C%2Fb%3E+'
   93   167        CONCAT                                           ~126    ~125, !22
        168        CONCAT                                           ~127    ~126, '%2C+%0A%0A%3Cbr%3E%0A++++++%3Cb%3Edescription%3A%3C%2Fb%3E+'
   95   169        CONCAT                                           ~128    ~127, !23
        170        CONCAT                                           ~129    ~128, '%2C+%0A%0A%3Cbr%3E%3Cbr%3E%0A++++++%3Cb%3Eplaylist_url%3A%3C%2Fb%3E+'
   97   171        CONCAT                                           ~130    ~129, !24
        172        CONCAT                                           ~131    ~130, '%2C+%0A%0A%0A+%3Cbr%3E%3Cbr%3E'
        173        ECHO                                                     ~131
  105   174        INIT_FCALL_BY_NAME                                       'mysql_close'
        175        SEND_VAR_EX                                              !17
        176        DO_FCALL                                      0          
  106   177      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.03 ms | 1412 KiB | 29 Q