attributes() as $name=>$attr) { $res[$name]=$attr; } // Traverse the items returned. You will need to customize // this routine for the Yahoo! web service that you use. // This particular routine outpus results from the Yahoo! // Image Search Web Service. $first = $res['firstResultPosition']; $last = $first + $res['totalResultsReturned']-1; echo "
Matched ${res['totalResultsAvailable']}, showing $first to $last
\n"; if(!empty($res['ResultSetMapUrl'])) { echo "Result Set Map: ${res[ResultSetMapUrl]}
\n"; } // Go through each item returned and display interesting values for($i=0; $i<$res['totalResultsReturned']; $i++) { foreach($phpobject->Result[$i] as $key=>$value) { switch($key) { case 'Thumbnail': echo "