3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* filename: amazon_config.php created: 7/17/2002, © 2002 php9.com Calin Uioreanu descripton: configuration variables for Amazon Parser */ ////////////////////// // Modifiable section // if you have a valid Amazon associate Id, place it here to be rewarded for the traffic you generate to Amazon define('ASSOCIATE_ID', 'php9comweblot-20'); // Amazon specific constants define('IMAGEURLMEDIUM_HEIGHT', 140); define('IMAGEURLMEDIUM_WIDTH', 107); ////////////////////// // Read only section // Do not change this constant define('DEVELOPER_TOKEN','D37FFQXOC3MRYZ'); // XSL live transform Amazon data to HTML define('PRODUCT_DETAIL_URL','http://xml.amazon.com/onca/xml3?t='.ASSOCIATE_ID.'&dev-t='.DEVELOPER_TOKEN.'&type=heavy&f=http://www.php9.com/php9-data-to-htmls.xsl&AsinSearch='); if (!$sCurrentMode = $_GET['Mode']) { $sCurrentMode = 'books'; } $arModes = array ( 'baby' => 'baby (Baby)', 'books' => 'books (Books)', 'classical' => 'classical (Classical Music)', 'dvd' => 'dvd (DVD)', 'electronics' => 'electronics (Electronics)', 'garden' => 'garden (Outdoor Living)', 'kitchen' => 'kitchen (Kitchen & Housewares)', 'magazines' => 'magazines (Magazines)', 'music' => 'music (Popular Music)', 'pc-hardware' => 'pc-hardware (Computers)', 'photo' => 'photo (Camera & Photo)', 'software' => 'software (Software)', 'toys' => 'toys (Toys & Games)', 'universal' => 'universal (Tools & Hardware)', 'vhs' => 'vhs (Video)', 'videogames' => 'videogames (Computer & Video Games)' ); // sort by salesRank by default if (!$sCurrentModeSortType = $_GET['SortBy']) { $sCurrentModeSortType = '+salesrank'; } // Sort Types $arModeSortType = array ( 'baby' => array( '+pmrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+titlerank' => 'Alphabetical (A-Z)', ), 'books' => array( '+pmrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+reviewrank' => 'Average Customer Review', '+pricerank' => 'Price (Low to High)', '+inverse-pricerank' => 'Price (High to Low)', '+daterank' => 'Publication Date', '+titlerank' => 'Alphabetical (A-Z)', '-titlerank' => 'Alphabetical (Z-A)', ), 'classical' => array( '+pmrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+titlerank' => 'Alphabetical (A-Z)', ), 'dvd' => array( '+salesrank' => 'Bestselling', '+titlerank' => 'Alphabetical', ), 'electronics' => array( '+pmrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+titlerank' => 'Alphabetical', '+reviewrank' => 'Review', ), 'garden' => array( '+psrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+titlerank' => 'Alphabetical (A-Z)', '-titlerank' => 'Alphabetical (Z-A)', '+manufactrank' => 'Manufacturer (A-Z)', '-manufactrank' => 'Manufacturer (Z-A)', '+price' => 'Price (Low to High)', '-price' => 'Price (High to Low)', ), 'kitchen' => array( '+psrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+titlerank' => 'Alphabetical (A-Z)', '-titlerank' => 'Alphabetical (Z-A)', '+manufactrank' => 'Manufacturer (A-Z)', '-manufactrank' => 'Manufacturer (Z-A)', '+price' => 'Price (Low to High)', '-price' => 'Price (High to Low)', ), 'magazines' => array( '+pmrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+titlerank' => 'Alphabetical (A-Z)', ), 'music' => array( '+psrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+artistrank' => 'Artist Name', '+orig-rel-date' => 'Original Release Date', '+titlerank' => 'Alphabetical', ), 'pc-hardware' => array( '+psrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+titlerank' => 'Alphabetical (A-Z)', '-titlerank' => 'Alphabetical (Z-A)', ), 'photo' => array( '+pmrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+titlerank' => 'Alphabetical (A-Z)', '-titlerank' => 'Alphabetical (Z-A)', ), 'software' => array( '+pmrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+titlerank' => 'Alphabetical', '+price' => 'Price (Low to High)', '+price' => 'Price (High to Low)', ), 'toys' => array( '+pmrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+titlerank' => 'Alphabetical (A-Z)', ), 'universal' => array( '+psrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+titlerank' => 'Alphabetical (A-Z)', '-titlerank' => 'Alphabetical (Z-A)', '+manufactrank' => 'Manufacturer (A-Z)', '-manufactrank' => 'Manufacturer (Z-A)', '+price' => 'Price (Low to High)', '-price' => 'Price (High to Low)', ), 'vhs' => array( '+psrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+titlerank' => 'Alphabetical', ), 'videogames' => array( '+pmrank' => 'Featured Items', '+salesrank' => 'Bestselling', '+titlerank' => 'Alphabetical', '+price' => 'Price (Low to High)', '-price' => 'Price (High to Low)', ), ); $sUrl = 'http://xml.amazon.com/onca/xml3'; $sUrl .= '?t='. ASSOCIATE_ID; $sUrl .= '&dev-t='. DEVELOPER_TOKEN; $sUrl .= '&mode=' . $sCurrentMode; $sUrl .= '&type=lite&page=1'; $sUrl .= '&f=xml'; $sUrl .= '&KeywordSearch='; // search for PHP Books by default if (@$_GET['Search']) { error_log ("\n " . $_GET['Search'] ." from $sCurrentMode at ". date("F j, Y, g:i a"), 3, "amazon_search.log"); $sUrl .= urlencode ($_GET['Search']); } else { $sUrl .= 'php'; } $sUrl .= '&sort='. $sCurrentModeSortType; ?> <!-- Script generated with the Amazon PHP API from php9.com Try it here: http://www.php9.com/amazon.php //-->
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 32
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 39
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 57, Position 2 = 80
Branch analysis from position: 57
1 jumps found. (Code = 42) Position 1 = 81
Branch analysis from position: 81
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 80
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 32
filename:       /in/qJle8
function name:  (null)
number of ops:  85
compiled vars:  !0 = $sCurrentMode, !1 = $arModes, !2 = $sCurrentModeSortType, !3 = $arModeSortType, !4 = $sUrl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'ASSOCIATE_ID'
          2        SEND_VAL                                                 'php9comweblot-20'
          3        DO_ICALL                                                 
   17     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'IMAGEURLMEDIUM_HEIGHT'
          6        SEND_VAL                                                 140
          7        DO_ICALL                                                 
   18     8        INIT_FCALL                                               'define'
          9        SEND_VAL                                                 'IMAGEURLMEDIUM_WIDTH'
         10        SEND_VAL                                                 107
         11        DO_ICALL                                                 
   24    12        INIT_FCALL                                               'define'
         13        SEND_VAL                                                 'DEVELOPER_TOKEN'
         14        SEND_VAL                                                 'D37FFQXOC3MRYZ'
         15        DO_ICALL                                                 
   27    16        INIT_FCALL                                               'define'
         17        SEND_VAL                                                 'PRODUCT_DETAIL_URL'
         18        FETCH_CONSTANT                                   ~9      'ASSOCIATE_ID'
         19        CONCAT                                           ~10     'http%3A%2F%2Fxml.amazon.com%2Fonca%2Fxml3%3Ft%3D', ~9
         20        CONCAT                                           ~11     ~10, '%26dev-t%3D'
         21        FETCH_CONSTANT                                   ~12     'DEVELOPER_TOKEN'
         22        CONCAT                                           ~13     ~11, ~12
         23        CONCAT                                           ~14     ~13, '%26type%3Dheavy%26f%3Dhttp%3A%2F%2Fwww.php9.com%2Fphp9-data-to-htmls.xsl%26AsinSearch%3D'
         24        SEND_VAL                                                 ~14
         25        DO_ICALL                                                 
   29    26        FETCH_R                      global              ~16     '_GET'
         27        FETCH_DIM_R                                      ~17     ~16, 'Mode'
         28        ASSIGN                                           ~18     !0, ~17
         29        BOOL_NOT                                         ~19     ~18
         30      > JMPZ                                                     ~19, ->32
   30    31    >   ASSIGN                                                   !0, 'books'
   33    32    >   ASSIGN                                                   !1, <array>
   54    33        FETCH_R                      global              ~22     '_GET'
         34        FETCH_DIM_R                                      ~23     ~22, 'SortBy'
         35        ASSIGN                                           ~24     !2, ~23
         36        BOOL_NOT                                         ~25     ~24
         37      > JMPZ                                                     ~25, ->39
   55    38    >   ASSIGN                                                   !2, '%2Bsalesrank'
   59    39    >   ASSIGN                                                   !3, <array>
  171    40        ASSIGN                                                   !4, 'http%3A%2F%2Fxml.amazon.com%2Fonca%2Fxml3'
  172    41        FETCH_CONSTANT                                   ~29     'ASSOCIATE_ID'
         42        CONCAT                                           ~30     '%3Ft%3D', ~29
         43        ASSIGN_OP                                     8          !4, ~30
  173    44        FETCH_CONSTANT                                   ~32     'DEVELOPER_TOKEN'
         45        CONCAT                                           ~33     '%26dev-t%3D', ~32
         46        ASSIGN_OP                                     8          !4, ~33
  174    47        CONCAT                                           ~35     '%26mode%3D', !0
         48        ASSIGN_OP                                     8          !4, ~35
  175    49        ASSIGN_OP                                     8          !4, '%26type%3Dlite%26page%3D1'
  176    50        ASSIGN_OP                                     8          !4, '%26f%3Dxml'
  177    51        ASSIGN_OP                                     8          !4, '%26KeywordSearch%3D'
  180    52        BEGIN_SILENCE                                    ~40     
         53        FETCH_R                      global              ~41     '_GET'
         54        FETCH_DIM_R                                      ~42     ~41, 'Search'
         55        END_SILENCE                                              ~40
         56      > JMPZ                                                     ~42, ->80
  181    57    >   INIT_FCALL                                               'error_log'
         58        FETCH_R                      global              ~43     '_GET'
         59        FETCH_DIM_R                                      ~44     ~43, 'Search'
         60        CONCAT                                           ~45     '%0A+', ~44
         61        ROPE_INIT                                     3  ~47     '+from+'
         62        ROPE_ADD                                      1  ~47     ~47, !0
         63        ROPE_END                                      2  ~46     ~47, '+at+'
         64        CONCAT                                           ~49     ~45, ~46
         65        INIT_FCALL                                               'date'
         66        SEND_VAL                                                 'F+j%2C+Y%2C+g%3Ai+a'
         67        DO_ICALL                                         $50     
         68        CONCAT                                           ~51     ~49, $50
         69        SEND_VAL                                                 ~51
         70        SEND_VAL                                                 3
         71        SEND_VAL                                                 'amazon_search.log'
         72        DO_ICALL                                                 
  182    73        INIT_FCALL                                               'urlencode'
         74        FETCH_R                      global              ~53     '_GET'
         75        FETCH_DIM_R                                      ~54     ~53, 'Search'
         76        SEND_VAL                                                 ~54
         77        DO_ICALL                                         $55     
         78        ASSIGN_OP                                     8          !4, $55
         79      > JMP                                                      ->81
  184    80    >   ASSIGN_OP                                     8          !4, 'php'
  187    81    >   CONCAT                                           ~58     '%26sort%3D', !2
         82        ASSIGN_OP                                     8          !4, ~58
  190    83        ECHO                                                     '%3C%21--%0AScript+generated+with+the+Amazon+PHP+API+from+php9.com%0ATry+it+here%3A+http%3A%2F%2Fwww.php9.com%2Famazon.php%0A%2F%2F--%3E'
  193    84      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.96 ms | 1409 KiB | 21 Q