Welcome to WebmasterWorld Guest from 54.162.141.212

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

NuSOAP and Google API?

     
9:34 pm on Nov 5, 2005 (gmt 0)

10+ Year Member



whenever I get results using the api and nusoap.php there are always alot of duplicates. I think this is because filter is defaulted to false and it needs to be true to remove duplicates.

However If I change my soap parameters

[codes]
$options = array(
'key' => "key",
'q' => "$_GET[search_word]",
'start' => 0,
'maxResults' => 10,
'filter' => true,
'restrict' => '',
'safeSearch' => false,
'lr' => $Res_Country,
'ie' => '',
'oe' => ''
);
[/codes]

If makes not difference and google still returns unfiltered results. I read on [forums.#*$!.com...] (read the last post) that nusoap changes "true" to "1", butt google doesn't recognise this. Any idea how i can change this?

11:21 pm on Nov 5, 2005 (gmt 0)

10+ Year Member



maybe 'true' (between quotes)
11:25 pm on Nov 5, 2005 (gmt 0)

10+ Year Member



After a bit of searching I found the solution, It is a problem with nusoap itself. edit nusoap.php

Hmm I fixed the problem:

nusoap.php, line 0223:

replace
php Code:

1.
case (is_bool($val) ¦¦ $type == 'boolean'):
2.
if(!$val){
3.
$val = 0;
4.
}

by

php Code:

1.
case (is_bool($val) ¦¦ $type == 'boolean'):
2.
if(!$val){
3.
$val = 'false';
4.
}
5.
else $val = 'true';

11:49 pm on Nov 5, 2005 (gmt 0)

10+ Year Member



Interesting hack
well done!
 

Featured Threads

Hot Threads This Week

Hot Threads This Month