homepage Welcome to WebmasterWorld Guest from 107.22.45.61
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
NuSOAP and Google API?
zootreeves




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

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?

 

NomikOS




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

maybe 'true' (between quotes)

zootreeves




msg:1313996
 11:25 pm on Nov 5, 2005 (gmt 0)

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';

NomikOS




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

Interesting hack
well done!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved