Problem executing nusoap.php

From: Date: Thu, 07 Aug 2003 04:33:09 +0000
Subject: Problem executing nusoap.php
Groups: php.soap 
Request: Send a blank email to php-soap+get-930@lists.php.net to get a copy of this message
Hi, I am new to soap and php. Tried to test googlesearch.php file (as attachment) from Chris Petersen. Which invokes nusoap.php. I have all the necessary class files that nusoap.php included and put in the same directory with googlesearch.php and nusoap.php. Also I have Google's licence key as well. But when executed googlesearch.php. It only displays the documentation of class.soapclinet.php and nothing else. Could anybody tell me what is the problem? Please help. Thanks, Daniel _________________________________________________________________ Linguaphone : Learning English? Get Japanese lessons for FREE http://go.msnserver.com/HK/30476.asp

<? /* Google API */ require_once("nusoap.php"); class GoogleSearchResults { var $estimatedTotalCount; var $searchTime; var $startIndex; var $endIndex; var $results; var $directories; } class GoogleSearchResult { var $cachedSize; var $hostName; var $snippet; var $summary; var $title; var $url; } function googleSearch($query, $startIndex) { $soapclient = new soapclient("GoogleSearch.wsdl", "wsdl"); $proxy = $soapclient->getProxy(); $result = $proxy->doGoogleSearch( "wzMXCPhQFHIoNdE1l1x/hsudArv9AceZ", $query, $startIndex, 10, "false", "", "false", "", "latin1", "latin1"); $returnVal = new GoogleSearchResults(); $returnVal->estimatedTotalCount = $result["estimatedTotalResultsCount"]; $returnVal->searchTime = $result["searchTime"]; $returnVal->startIndex = $result["startIndex"]; $returnVal->endIndex = $result["endIndex"]; $rerurnVal->results = array(); $resultElements = $result["resultElements"]; for($i=0; $i<count($resultElements); $i++) { $entry = new GoogleSearchResult(); $entry->cachedSize = $resultElements[$i]["cachedSize"]; $entry->hostName = $resultElements[$i]["hostName"]; $entry->snippet = $resultElements[$i]["snippet"]; $entry->summary = $resultElements[$i]["summary"]; $entry->title = $resultElements[$i]["title"]; $entry->url = $resultElements[$i]["URL"]; $returnVal->results[$i] = $entry; } return $returnVal; } ?>
« previous php.soap (#930) next »