From: SourceForge.net <no...@so...> - 2008-05-19 14:29:14
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4972079 By: ajc13 I have a Google API key (SOAP) and I did not see how to enter/use it from trolling the code - but I found a bit from blootbot. Here is my svn diff to current on how I entered it: --- -- --- Index: Modules/W3Search.pl =================================================================== --- Modules/W3Search.pl (revision 1832) +++ Modules/W3Search.pl (working copy) @@ -29,7 +29,16 @@ return unless &::loadPerlModule("WWW::Search"); - eval { $Search = new WWW::Search( $where, agent_name => 'Mozilla/4.5' ); }; + eval { + if ($where eq 'Google') { + # key is your Google API key. + # Get it from http://api.google.com/createkey + $Search = new WWW::Search('Google',key => 'GOOGLE_SOPA_API_KEY') + #$Search = new WWW::Search('Google',key => &::IsParam('googleAPIkey') ) + } else { + $Search = new WWW::Search( $where, agent_name => 'Mozilla/4.5' ); + } + }; if ( !defined $Search ) { &::msg( $::who, "$where is invalid search." ); --- -- --- I wanted to make it a parameter - but the search came back as a bad key - if there are suggestion on that pointwould appreciate. -D ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=6514 |