<?xml version="1.0" encoding="ISO-8859-1"?>
<slide title="PEAR and SOAP">
    <example title="PEAR can do SOAP too" fontsize="1.4"><![CDATA[<?php
        require_once('SOAP/Client.php');
        
        $key = 'xxxxxxxxxxxx';
        $query = 'Coggeshall';
        
        $wsdlurl = 'http://api.google.com/GoogleSearch.wsdl';
        $WSDL = new SOAP_WSDL($wsdlurl);
        $client = $WSDL->getProxy();
        
        $response =
                $client->doGoogleSearch(
                            $key,$query,0,4,
                            false,'',false,'','','');
        
        foreach($response->resultElements as $result) {
            echo '<a href="'.$result->URL.'">';
            echo $result->title."</a><br><br>\n";
            echo $result->snippet."<br><br><br>\n";
        }
?> ]]>
    </example>
</slide>

