3v4l.org

run code in 300+ PHP versions simultaneously
<?php function processURL($url) { $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => 2 )); $result = curl_exec($ch); curl_close($ch); return $result; } // Tag als parameter auswerten $tag = 'IWH3F04ED0'; //$_GET["ID"]; $status = "0"; $db_server = 'rdbms.strato.de'; $db_benutzer = 'U1248927'; $db_passwort = 'oger1302'; $db_name = 'DB1248927'; $dz = mysql_connect($db_server, $db_benutzer, $db_passwort); mysql_select_db($db_name); $testguid = "Select * from `IWH` where `ID`='$tag'"; $result = mysql_query($testguid); if ($ds = mysql_fetch_object($result)) { $status = $ds ->Status; } $client_id = "4e950e12c0464c158995b32ac82792d1"; $url = 'https://api.instagram.com/v1/tags/'.$tag.'/media/recent?client_id='.$client_id; $all_result = processURL($url); $decoded_results = json_decode($all_result, true); if(empty($decoded_results['data'])) { // Status = '1' setzen ggf. aktivieren if ($status =="0") { // update status = 1 $aendern = "UPDATE `IWH` SET `Status` = '1' WHERE `ID`='$tag'"; $update = mysql_query($aendern); if ($update) { $status="1"; } } echo '<img src="https://scontent.cdninstagram.com/hphotos-xaf1/t51.2885-15/e15/11351734_443374872513879_1446730755_n.jpg" style="width:100%;" border="0" alt="Null" />'; } else { // count = Count +1 hochsetzen $aendern = "UPDATE `IWH` Set `Count` = `Count`+ 1 WHERE `ID`='$tag'"; $update = mysql_query($aendern); if ($update) { $status="1"; } header('location: https://instagram.com/explore/tags/'.$tag.'/'); } mysql_close($dz); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 60
Branch analysis from position: 46
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 58
Branch analysis from position: 48
2 jumps found. (Code = 43) Position 1 = 57, Position 2 = 58
Branch analysis from position: 57
1 jumps found. (Code = 42) Position 1 = 75
Branch analysis from position: 75
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 58
Branch analysis from position: 58
Branch analysis from position: 60
2 jumps found. (Code = 43) Position 1 = 69, Position 2 = 70
Branch analysis from position: 69
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 70
Branch analysis from position: 30
filename:       /in/uFjvT
function name:  (null)
number of ops:  79
compiled vars:  !0 = $tag, !1 = $status, !2 = $db_server, !3 = $db_benutzer, !4 = $db_passwort, !5 = $db_name, !6 = $dz, !7 = $testguid, !8 = $result, !9 = $ds, !10 = $client_id, !11 = $url, !12 = $all_result, !13 = $decoded_results, !14 = $aendern, !15 = $update
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ASSIGN                                                   !0, 'IWH3F04ED0'
   22     1        ASSIGN                                                   !1, '0'
   24     2        ASSIGN                                                   !2, 'rdbms.strato.de'
   25     3        ASSIGN                                                   !3, 'U1248927'
   26     4        ASSIGN                                                   !4, 'oger1302'
   27     5        ASSIGN                                                   !5, 'DB1248927'
   28     6        INIT_FCALL_BY_NAME                                       'mysql_connect'
          7        SEND_VAR_EX                                              !2
          8        SEND_VAR_EX                                              !3
          9        SEND_VAR_EX                                              !4
         10        DO_FCALL                                      0  $22     
         11        ASSIGN                                                   !6, $22
   30    12        INIT_FCALL_BY_NAME                                       'mysql_select_db'
         13        SEND_VAR_EX                                              !5
         14        DO_FCALL                                      0          
   32    15        ROPE_INIT                                     3  ~26     'Select+%2A+from+%60IWH%60+where+%60ID%60%3D%27'
         16        ROPE_ADD                                      1  ~26     ~26, !0
         17        ROPE_END                                      2  ~25     ~26, '%27'
         18        ASSIGN                                                   !7, ~25
   33    19        INIT_FCALL_BY_NAME                                       'mysql_query'
         20        SEND_VAR_EX                                              !7
         21        DO_FCALL                                      0  $29     
         22        ASSIGN                                                   !8, $29
   34    23        INIT_FCALL_BY_NAME                                       'mysql_fetch_object'
         24        SEND_VAR_EX                                              !8
         25        DO_FCALL                                      0  $31     
         26        ASSIGN                                           ~32     !9, $31
         27      > JMPZ                                                     ~32, ->30
   36    28    >   FETCH_OBJ_R                                      ~33     !9, 'Status'
         29        ASSIGN                                                   !1, ~33
   39    30    >   ASSIGN                                                   !10, '4e950e12c0464c158995b32ac82792d1'
   40    31        CONCAT                                           ~36     'https%3A%2F%2Fapi.instagram.com%2Fv1%2Ftags%2F', !0
         32        CONCAT                                           ~37     ~36, '%2Fmedia%2Frecent%3Fclient_id%3D'
         33        CONCAT                                           ~38     ~37, !10
         34        ASSIGN                                                   !11, ~38
   42    35        INIT_FCALL                                               'processurl'
         36        SEND_VAR                                                 !11
         37        DO_FCALL                                      0  $40     
         38        ASSIGN                                                   !12, $40
   43    39        INIT_FCALL                                               'json_decode'
         40        SEND_VAR                                                 !12
         41        SEND_VAL                                                 <true>
         42        DO_ICALL                                         $42     
         43        ASSIGN                                                   !13, $42
   45    44        ISSET_ISEMPTY_DIM_OBJ                         1          !13, 'data'
         45      > JMPZ                                                     ~44, ->60
   49    46    >   IS_EQUAL                                                 !1, '0'
         47      > JMPZ                                                     ~45, ->58
   52    48    >   ROPE_INIT                                     3  ~47     'UPDATE+%60IWH%60+SET+%60Status%60+%3D+%271%27++WHERE+%60ID%60%3D%27'
         49        ROPE_ADD                                      1  ~47     ~47, !0
         50        ROPE_END                                      2  ~46     ~47, '%27'
         51        ASSIGN                                                   !14, ~46
   53    52        INIT_FCALL_BY_NAME                                       'mysql_query'
         53        SEND_VAR_EX                                              !14
         54        DO_FCALL                                      0  $50     
         55        ASSIGN                                                   !15, $50
   54    56      > JMPZ                                                     !15, ->58
   56    57    >   ASSIGN                                                   !1, '1'
   59    58    >   ECHO                                                     '%3Cimg+src%3D%22https%3A%2F%2Fscontent.cdninstagram.com%2Fhphotos-xaf1%2Ft51.2885-15%2Fe15%2F11351734_443374872513879_1446730755_n.jpg%22+style%3D%22width%3A100%25%3B%22+border%3D%220%22+alt%3D%22Null%22+%2F%3E'
         59      > JMP                                                      ->75
   64    60    >   ROPE_INIT                                     3  ~54     'UPDATE+%60IWH%60+Set+%60Count%60+%3D+%60Count%60%2B+1++WHERE+%60ID%60%3D%27'
         61        ROPE_ADD                                      1  ~54     ~54, !0
         62        ROPE_END                                      2  ~53     ~54, '%27'
         63        ASSIGN                                                   !14, ~53
   65    64        INIT_FCALL_BY_NAME                                       'mysql_query'
         65        SEND_VAR_EX                                              !14
         66        DO_FCALL                                      0  $57     
         67        ASSIGN                                                   !15, $57
   66    68      > JMPZ                                                     !15, ->70
   68    69    >   ASSIGN                                                   !1, '1'
   70    70    >   INIT_FCALL                                               'header'
         71        CONCAT                                           ~60     'location%3A+https%3A%2F%2Finstagram.com%2Fexplore%2Ftags%2F', !0
         72        CONCAT                                           ~61     ~60, '%2F'
         73        SEND_VAL                                                 ~61
         74        DO_ICALL                                                 
   73    75    >   INIT_FCALL_BY_NAME                                       'mysql_close'
         76        SEND_VAR_EX                                              !6
         77        DO_FCALL                                      0          
   75    78      > RETURN                                                   1

Function processurl:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uFjvT
function name:  processURL
number of ops:  25
compiled vars:  !0 = $url, !1 = $ch, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        INIT_FCALL_BY_NAME                                       'curl_init'
          2        DO_FCALL                                      0  $3      
          3        ASSIGN                                                   !1, $3
    7     4        INIT_FCALL_BY_NAME                                       'curl_setopt_array'
          5        SEND_VAR_EX                                              !1
    8     6        FETCH_CONSTANT                                   ~5      'CURLOPT_URL'
          7        INIT_ARRAY                                       ~6      !0, ~5
    9     8        FETCH_CONSTANT                                   ~7      'CURLOPT_RETURNTRANSFER'
    8     9        ADD_ARRAY_ELEMENT                                ~6      <true>, ~7
   10    10        FETCH_CONSTANT                                   ~8      'CURLOPT_SSL_VERIFYPEER'
    8    11        ADD_ARRAY_ELEMENT                                ~6      <false>, ~8
   11    12        FETCH_CONSTANT                                   ~9      'CURLOPT_SSL_VERIFYHOST'
         13        ADD_ARRAY_ELEMENT                                ~6      2, ~9
         14        SEND_VAL_EX                                              ~6
         15        DO_FCALL                                      0          
   14    16        INIT_FCALL_BY_NAME                                       'curl_exec'
         17        SEND_VAR_EX                                              !1
         18        DO_FCALL                                      0  $11     
         19        ASSIGN                                                   !2, $11
   15    20        INIT_FCALL_BY_NAME                                       'curl_close'
         21        SEND_VAR_EX                                              !1
         22        DO_FCALL                                      0          
   16    23      > RETURN                                                   !2
   17    24*     > RETURN                                                   null

End of function processurl

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.72 ms | 1407 KiB | 18 Q