Re: [SOAP] Simple Example - Google Spell check - no worky

From: Date: Mon, 08 Dec 2003 17:04:58 +0000
Subject: Re: [SOAP] Simple Example - Google Spell check - no worky
References: 1 2 3 4 5  Groups: php.soap 
Request: Send a blank email to php-soap+get-1215@lists.php.net to get a copy of this message
seems to work for me (PHP 4.3.4, PEAR::SOAP 0.8.RC1), I get the following output: Notice: Undefined variable: devKey in /path/to/soaptest.php on line 11 Notice: Undefined index: p in /path/to/soaptest.php on line 12 No result or NULL returned (which is OK since I have no variable devKey and no POST variable p). Regards Christian Blaine Lang wrote: > Hum, > > Now I get the following error: > > Call to undefined function: getproxy() > > Complete code is now: > > // include the class > require_once 'SOAP/Client.php'; > // create a instance of the SOAP client object > $wsdl = new > SOAP_WSDL('http://api.google.com/GoogleSearch.wsdl'); > $soapclient = $wsdl->getProxy(); > > // set up an array containing input parameters to be > // passed to the remote procedure > $parms = array( > 'key' => $devKey, // Googlelicense key > 'phrase' => $_POST['p'] // term to check > ); > > // invoke the method on the server > $result = $soapclient->doSpellingSuggestion($parms,'urn:GoogleSearch'); > if (!PEAR::isError($result)) { > echo "Google suggests <b>" . $result . "</b> for the term > <b>" . > $_POST['p'] . "</b><br>"; > } else { > echo "No result or NULL returned<br>"; > }

« previous php.soap (#1215) next »