Hello, I've got a problem with the "filter" attribute of the search request. The "documentFiltering" of the results is always set to "false", even when filtering should be performed (when testing with the same query on other google-api engines). And the "hostName" of the search results is always empty. So it doesn't seems to work, but filter is correctly set to true ! I don't understand. I asked others php coders, and with the same code it works with them. (even if I noticed that filtering doesn't work too on some website using google-api, I'm not alone). Here's my code (in PHP) : $parameters = array( "key" => $key, "q" => $Query, "start" => $start, "maxResults" => $maxResults, "filter" => true, "restrict" => $restrict, "safeSearch" => true, "lr" => $lg, "ie" => "", "oe" => "" ); $soapclient = new soapclient("http://api.google.com/search/beta2"); $result = $soapclient->call("doGoogleSearch", $parameters, "urn:GoogleSearch"); PHP: I saw in an other post that someone had the same problem, and I changed nusoap.php like indicated : if ($uqType == 'boolean' && !$value) { $value = 'false'; } elseif ($uqType == 'boolean') { $value = 'true'; } PHP: But it still doesn't work Can you help me please ? Thanks Epsilon
Hmm I fixed the problem: nusoap.php, line 0223: replace case (is_bool($val) || $type == 'boolean'): if(!$val){ $val = 0; } PHP: by case (is_bool($val) || $type == 'boolean'): if(!$val){ $val = 'false'; } else $val = 'true'; PHP:
I think it must be a common issue with nusoap, because someone else had the same problem shown here. - Shawn
I totally agree, I made myself guilty of lazy coding by using the select * statement. I had a large number of databases, tables and fields, which significantly slowed down my performance and was a heavy load on my server resources. Fixed it all, selected only the fields I required and everything was back to normal.