- • Using objects to make Amazon simple
- • Used genproxy.php to get a starting point
- • Modified generated proxy to make class easier to use
- • Hand coded "type" classes based on XML Schema
- • Built logic into the "type" classes to manipulate and output the data
- • Now a simple script produces cool results!
- • Code available in PEAR::SOAP CVS
<?php
require_once 'amazon.php';
require_once 'config.php';
$amazon = new Amazon('soap',$amazon_id);
$amazon->SearchForm($_REQUEST);
if (count($_REQUEST)) {
if ($amazon->Search($_REQUEST)) {
// display a second search form at the bottom of page
$amazon->SearchForm($_REQUEST);
}
}
?>