3v4l.org

run code in 300+ PHP versions simultaneously
<?php $STATS_FILE = 'http://89.223.41.232:8000/status.xsl'; $DOCROOT = '/var/www/ideep1ru/playingnow/info'; // Корень сайта $hostname = "89.223.41.232"; $username = "radio"; // Имя пользователя для БД $password = "radio"; // И пароль $dbName = "radio"; // Имя БД $last1="http://ws.audioscrobbler.com/2.0/?method=track.getinfo&api_key=601f627a9fbb34ef24bc288cad4976e9&artist="; $last2="&track="; $spotify1="https://itunes.apple.com/search?term="; $spotify2=" - "; $spotify3="&limit=1"; $fp = fopen($STATS_FILE,'r'); if(!$fp) { die("Unable to connect to Icecast server."); } $stats_file_contents = ''; while(!feof($fp)) { $stats_file_contents .= fread($fp,1024); } fclose($fp); $radio_info = array(); $radio_info['genre'] = ''; $radio_info['listeners'] = ''; $radio_info['now_playing'] = ''; $temp = array(); $search_for = "<td\s[^>]*class=\"streamdata\">(.*)<\/td>"; $search_td = array('<td class="streamdata">','</td>'); if(preg_match_all("/$search_for/siU",$stats_file_contents,$matches)) { foreach($matches[0] as $match) { $to_push = str_replace($search_td,'',$match); $to_push = trim($to_push); array_push($temp,$to_push); } } $radio_info['listeners'] = $temp[4]; $radio_info['genre'] = $temp[6]; //$radio_info['now_playing'] = $temp[8]; //$radio_info['now_playing'] = $temp[8]; $radio_info['info']['now_playing'] = $temp[8]; $x = explode(" - ",$temp[8]); $artist1 = $x[0]; $song1 = $x[1]; $artist1 = str_replace('&amp;', 'and', $artist1); $song1 = str_replace('&amp;', 'and', $song1); $ttt =" - "; $title = $artist1.$ttt.$song1; $img640_url= "https://i.deep1.ru/playingnow/logo_default.png"; $img300_url= "https://i.deep1.ru/playingnow/logo_default.png"; $img64_url= "https://i.deep1.ru/playingnow/logo_default.png"; echo $spotify_url=$spotify1.$artist1.$spotify2.$song1.$spotify3 ; echo $spotify_url = str_replace(' ', '+', $spotify_url); //$spotify_url = "https://itunes.apple.com/search?term=Kylie+Minogue"; $ch = curl_init($spotify_url); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $spotify = curl_exec($ch); curl_close($ch); $obj = json_decode($spotify); //$total = $obj->resultCount->results; //$img640_url = $obj->resultCount[0]->results[1]->artworkUrl100; echo $img640_url;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 21
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 53, Position 2 = 72
Branch analysis from position: 53
2 jumps found. (Code = 77) Position 1 = 55, Position 2 = 71
Branch analysis from position: 55
2 jumps found. (Code = 78) Position 1 = 56, Position 2 = 71
Branch analysis from position: 56
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
Branch analysis from position: 71
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 71
Branch analysis from position: 72
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 21
Branch analysis from position: 31
Branch analysis from position: 21
filename:       /in/Bp0sq
function name:  (null)
number of ops:  147
compiled vars:  !0 = $STATS_FILE, !1 = $DOCROOT, !2 = $hostname, !3 = $username, !4 = $password, !5 = $dbName, !6 = $last1, !7 = $last2, !8 = $spotify1, !9 = $spotify2, !10 = $spotify3, !11 = $fp, !12 = $stats_file_contents, !13 = $radio_info, !14 = $temp, !15 = $search_for, !16 = $search_td, !17 = $matches, !18 = $match, !19 = $to_push, !20 = $x, !21 = $artist1, !22 = $song1, !23 = $ttt, !24 = $title, !25 = $img640_url, !26 = $img300_url, !27 = $img64_url, !28 = $spotify_url, !29 = $ch, !30 = $headers, !31 = $spotify, !32 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2F89.223.41.232%3A8000%2Fstatus.xsl'
    6     1        ASSIGN                                                   !1, '%2Fvar%2Fwww%2Fideep1ru%2Fplayingnow%2Finfo'
    7     2        ASSIGN                                                   !2, '89.223.41.232'
    8     3        ASSIGN                                                   !3, 'radio'
    9     4        ASSIGN                                                   !4, 'radio'
   10     5        ASSIGN                                                   !5, 'radio'
   11     6        ASSIGN                                                   !6, 'http%3A%2F%2Fws.audioscrobbler.com%2F2.0%2F%3Fmethod%3Dtrack.getinfo%26api_key%3D601f627a9fbb34ef24bc288cad4976e9%26artist%3D'
   12     7        ASSIGN                                                   !7, '%26track%3D'
   13     8        ASSIGN                                                   !8, 'https%3A%2F%2Fitunes.apple.com%2Fsearch%3Fterm%3D'
   14     9        ASSIGN                                                   !9, '+-+'
   15    10        ASSIGN                                                   !10, '%26limit%3D1'
   19    11        INIT_FCALL                                               'fopen'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 'r'
         14        DO_ICALL                                         $44     
         15        ASSIGN                                                   !11, $44
   20    16        BOOL_NOT                                         ~46     !11
         17      > JMPZ                                                     ~46, ->19
         18    > > EXIT                                                     'Unable+to+connect+to+Icecast+server.'
   21    19    >   ASSIGN                                                   !12, ''
   22    20      > JMP                                                      ->26
         21    >   INIT_FCALL                                               'fread'
         22        SEND_VAR                                                 !11
         23        SEND_VAL                                                 1024
         24        DO_ICALL                                         $48     
         25        ASSIGN_OP                                     8          !12, $48
         26    >   INIT_FCALL                                               'feof'
         27        SEND_VAR                                                 !11
         28        DO_ICALL                                         $50     
         29        BOOL_NOT                                         ~51     $50
         30      > JMPNZ                                                    ~51, ->21
   24    31    >   INIT_FCALL                                               'fclose'
         32        SEND_VAR                                                 !11
         33        DO_ICALL                                                 
   26    34        ASSIGN                                                   !13, <array>
   28    35        ASSIGN_DIM                                               !13, 'genre'
         36        OP_DATA                                                  ''
   29    37        ASSIGN_DIM                                               !13, 'listeners'
         38        OP_DATA                                                  ''
   30    39        ASSIGN_DIM                                               !13, 'now_playing'
         40        OP_DATA                                                  ''
   34    41        ASSIGN                                                   !14, <array>
   35    42        ASSIGN                                                   !15, '%3Ctd%5Cs%5B%5E%3E%5D%2Aclass%3D%22streamdata%22%3E%28.%2A%29%3C%5C%2Ftd%3E'
   36    43        ASSIGN                                                   !16, <array>
   37    44        INIT_FCALL                                               'preg_match_all'
         45        ROPE_INIT                                     3  ~61     '%2F'
         46        ROPE_ADD                                      1  ~61     ~61, !15
         47        ROPE_END                                      2  ~60     ~61, '%2FsiU'
         48        SEND_VAL                                                 ~60
         49        SEND_VAR                                                 !12
         50        SEND_REF                                                 !17
         51        DO_ICALL                                         $63     
         52      > JMPZ                                                     $63, ->72
   38    53    >   FETCH_DIM_R                                      ~64     !17, 0
         54      > FE_RESET_R                                       $65     ~64, ->71
         55    > > FE_FETCH_R                                               $65, !18, ->71
   39    56    >   INIT_FCALL                                               'str_replace'
         57        SEND_VAR                                                 !16
         58        SEND_VAL                                                 ''
         59        SEND_VAR                                                 !18
         60        DO_ICALL                                         $66     
         61        ASSIGN                                                   !19, $66
   40    62        INIT_FCALL                                               'trim'
         63        SEND_VAR                                                 !19
         64        DO_ICALL                                         $68     
         65        ASSIGN                                                   !19, $68
   41    66        INIT_FCALL                                               'array_push'
         67        SEND_REF                                                 !14
         68        SEND_VAR                                                 !19
         69        DO_ICALL                                                 
   38    70      > JMP                                                      ->55
         71    >   FE_FREE                                                  $65
   45    72    >   FETCH_DIM_R                                      ~72     !14, 4
         73        ASSIGN_DIM                                               !13, 'listeners'
         74        OP_DATA                                                  ~72
   46    75        FETCH_DIM_R                                      ~74     !14, 6
         76        ASSIGN_DIM                                               !13, 'genre'
         77        OP_DATA                                                  ~74
   49    78        FETCH_DIM_R                                      ~77     !14, 8
         79        FETCH_DIM_W                                      $75     !13, 'info'
         80        ASSIGN_DIM                                               $75, 'now_playing'
         81        OP_DATA                                                  ~77
   50    82        INIT_FCALL                                               'explode'
         83        SEND_VAL                                                 '+-+'
         84        FETCH_DIM_R                                      ~78     !14, 8
         85        SEND_VAL                                                 ~78
         86        DO_ICALL                                         $79     
         87        ASSIGN                                                   !20, $79
   51    88        FETCH_DIM_R                                      ~81     !20, 0
         89        ASSIGN                                                   !21, ~81
   52    90        FETCH_DIM_R                                      ~83     !20, 1
         91        ASSIGN                                                   !22, ~83
   53    92        INIT_FCALL                                               'str_replace'
         93        SEND_VAL                                                 '%26amp%3B'
         94        SEND_VAL                                                 'and'
         95        SEND_VAR                                                 !21
         96        DO_ICALL                                         $85     
         97        ASSIGN                                                   !21, $85
   54    98        INIT_FCALL                                               'str_replace'
         99        SEND_VAL                                                 '%26amp%3B'
        100        SEND_VAL                                                 'and'
        101        SEND_VAR                                                 !22
        102        DO_ICALL                                         $87     
        103        ASSIGN                                                   !22, $87
   55   104        ASSIGN                                                   !23, '+-+'
   56   105        CONCAT                                           ~90     !21, !23
        106        CONCAT                                           ~91     ~90, !22
        107        ASSIGN                                                   !24, ~91
   57   108        ASSIGN                                                   !25, 'https%3A%2F%2Fi.deep1.ru%2Fplayingnow%2Flogo_default.png'
   58   109        ASSIGN                                                   !26, 'https%3A%2F%2Fi.deep1.ru%2Fplayingnow%2Flogo_default.png'
   59   110        ASSIGN                                                   !27, 'https%3A%2F%2Fi.deep1.ru%2Fplayingnow%2Flogo_default.png'
   64   111        CONCAT                                           ~96     !8, !21
        112        CONCAT                                           ~97     ~96, !9
        113        CONCAT                                           ~98     ~97, !22
        114        CONCAT                                           ~99     ~98, !10
        115        ASSIGN                                           ~100    !28, ~99
        116        ECHO                                                     ~100
   66   117        INIT_FCALL                                               'str_replace'
        118        SEND_VAL                                                 '+'
        119        SEND_VAL                                                 '%2B'
        120        SEND_VAR                                                 !28
        121        DO_ICALL                                         $101    
        122        ASSIGN                                           ~102    !28, $101
        123        ECHO                                                     ~102
   71   124        INIT_FCALL_BY_NAME                                       'curl_init'
        125        SEND_VAR_EX                                              !28
        126        DO_FCALL                                      0  $103    
        127        ASSIGN                                                   !29, $103
   72   128        INIT_FCALL_BY_NAME                                       'curl_setopt'
        129        SEND_VAR_EX                                              !29
        130        FETCH_CONSTANT                                   ~105    'CURLOPT_HTTPHEADER'
        131        SEND_VAL_EX                                              ~105
        132        SEND_VAR_EX                                              !30
        133        DO_FCALL                                      0          
   73   134        INIT_FCALL_BY_NAME                                       'curl_exec'
        135        SEND_VAR_EX                                              !29
        136        DO_FCALL                                      0  $107    
        137        ASSIGN                                                   !31, $107
   75   138        INIT_FCALL_BY_NAME                                       'curl_close'
        139        SEND_VAR_EX                                              !29
        140        DO_FCALL                                      0          
   79   141        INIT_FCALL                                               'json_decode'
        142        SEND_VAR                                                 !31
        143        DO_ICALL                                         $110    
        144        ASSIGN                                                   !32, $110
   82   145        ECHO                                                     !25
        146      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.25 ms | 949 KiB | 34 Q