3v4l.org

run code in 300+ PHP versions simultaneously
<? // Set the save folder // [IMPORTANT NOTE]: // This sample saves the snapshot to the folder on the work dir of this script. // Please make sure the script has the WRITE permission in this folder. // You can also set the value to other folder, for example: // $t_strSaveFolder = "c:/temp"; $t_strSaveFolder = dirname(__FILE__); // Set the image filename $t_strLargeImage = $t_strSaveFolder."/main-thumb.large.png"; $t_strSmallImage = $t_strSaveFolder."/main-thumb.small.png"; // Create instance ACAWebThumb.ThumbMaker. $t_xMaker = new COM("ACAWebThumb.ThumbMaker") or die("Start ACAWebThumb.Maker failed"); // Set the URL and start snap $t_strURL = 'http://www.acasystems.com'; $t_xMaker->SetURL($t_strURL); $t_iRet = $t_xMaker->StartSnap(); if ( 0 == $t_iRet ) { // snap successful, save webpage to image with full size. $t_bRet1 = $t_xMaker->SaveImage($t_strLargeImage); // save webpage to thumbnail with 320x240 size $t_xMaker->SetThumbSize (320, 240, 0); $t_bRet2 = $t_xMaker->SaveImage($t_strSmallImage); // show the image online. if ( $t_bRet1 && $t_bRet2) { echo "The snapshot from <a href='".$t_strURL."' target=_blank>".$t_strURL."</a>:"; echo "<a href='main-thumb.large.png'>img src='main-thumb.small.png' border=1></a>"; } else { echo "ERROR: Can't save the snapshot to folder ".dirname(__FILE__).". "; echo "Please make sure the script has the WRITE PERMISSION in this folder."; } } else echo "ERROR: Snap from ".$t_strURL." failed. "; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 55
Branch analysis from position: 24
2 jumps found. (Code = 46) Position 1 = 38, Position 2 = 39
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 47
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
1 jumps found. (Code = 42) Position 1 = 58
Branch analysis from position: 58
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 58
Branch analysis from position: 58
Branch analysis from position: 39
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1hjrr
function name:  (null)
number of ops:  59
compiled vars:  !0 = $t_strSaveFolder, !1 = $t_strLargeImage, !2 = $t_strSmallImage, !3 = $t_xMaker, !4 = $t_strURL, !5 = $t_iRet, !6 = $t_bRet1, !7 = $t_bRet2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'dirname'
          1        SEND_VAL                                                 '%2Fin%2F1hjrr'
          2        DO_ICALL                                         $8      
          3        ASSIGN                                                   !0, $8
   11     4        CONCAT                                           ~10     !0, '%2Fmain-thumb.large.png'
          5        ASSIGN                                                   !1, ~10
   12     6        CONCAT                                           ~12     !0, '%2Fmain-thumb.small.png'
          7        ASSIGN                                                   !2, ~12
   15     8        NEW                                              $14     'COM'
          9        SEND_VAL_EX                                              'ACAWebThumb.ThumbMaker'
         10        DO_FCALL                                      0          
         11        ASSIGN                                           ~16     !3, $14
         12      > JMPNZ_EX                                         ~16     ~16, ->15
   16    13    > > EXIT                                                     'Start+ACAWebThumb.Maker+failed'
         14*       BOOL                                             ~16     <true>
   19    15    >   ASSIGN                                                   !4, 'http%3A%2F%2Fwww.acasystems.com'
   20    16        INIT_METHOD_CALL                                         !3, 'SetURL'
         17        SEND_VAR_EX                                              !4
         18        DO_FCALL                                      0          
   21    19        INIT_METHOD_CALL                                         !3, 'StartSnap'
         20        DO_FCALL                                      0  $19     
         21        ASSIGN                                                   !5, $19
   22    22        IS_EQUAL                                                 !5, 0
         23      > JMPZ                                                     ~21, ->55
   25    24    >   INIT_METHOD_CALL                                         !3, 'SaveImage'
         25        SEND_VAR_EX                                              !1
         26        DO_FCALL                                      0  $22     
         27        ASSIGN                                                   !6, $22
   28    28        INIT_METHOD_CALL                                         !3, 'SetThumbSize'
         29        SEND_VAL_EX                                              320
         30        SEND_VAL_EX                                              240
         31        SEND_VAL_EX                                              0
         32        DO_FCALL                                      0          
   29    33        INIT_METHOD_CALL                                         !3, 'SaveImage'
         34        SEND_VAR_EX                                              !2
         35        DO_FCALL                                      0  $25     
         36        ASSIGN                                                   !7, $25
   32    37      > JMPZ_EX                                          ~27     !6, ->39
         38    >   BOOL                                             ~27     !7
         39    > > JMPZ                                                     ~27, ->47
   34    40    >   CONCAT                                           ~28     'The+snapshot+from+%3Ca+href%3D%27', !4
         41        CONCAT                                           ~29     ~28, '%27+target%3D_blank%3E'
         42        CONCAT                                           ~30     ~29, !4
         43        CONCAT                                           ~31     ~30, '%3C%2Fa%3E%3A'
         44        ECHO                                                     ~31
   35    45        ECHO                                                     '%3Ca+href%3D%27main-thumb.large.png%27%3Eimg+src%3D%27main-thumb.small.png%27+border%3D1%3E%3C%2Fa%3E'
         46      > JMP                                                      ->54
   39    47    >   INIT_FCALL                                               'dirname'
         48        SEND_VAL                                                 '%2Fin%2F1hjrr'
         49        DO_ICALL                                         $32     
         50        CONCAT                                           ~33     'ERROR%3A+Can%27t+save+the+snapshot+to+folder+', $32
         51        CONCAT                                           ~34     ~33, '.+'
         52        ECHO                                                     ~34
   40    53        ECHO                                                     'Please+make+sure+the+script+has+the+WRITE+PERMISSION+in+this+folder.'
         54    > > JMP                                                      ->58
   44    55    >   CONCAT                                           ~35     'ERROR%3A+Snap+from+', !4
         56        CONCAT                                           ~36     ~35, '+failed.+'
         57        ECHO                                                     ~36
   45    58    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.02 ms | 1400 KiB | 15 Q