Include the SOAP Client

<?php require_once('SOAP/Client.php'); ?>

Generate the Client Proxy

<?php
$wsdlurl 
'http://api.google.com/GoogleSearch.wsdl';
$WSDL =& new SOAP_WSDL($wsdlurl);
$client =& $WSDL->getProxy();
?>

Make the SOAP Call

<?php
$response 
=
        
$client->doGoogleSearch(
                    
$key,$query,0,4,
                    
false,'',false,'','','');
?>

Do something with the results

<?php
foreach($response->resultElements as $result) {
    echo 
'<a href="'.$result->URL.'">';
    echo 
$result->title."</a><br><br>\n";
    echo 
$result->snippet."<br><br><br>\n";
}
?>