Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Other Search Engines

Quote Reply
Other Search Engines
I have read the following Thread:

http://www.gossamer-threads.com/...ew=&sb=&vc=1

And it seems close to what I want to do with the search.cgi but not exactly....

What I am attempting to do is allow people to select a "mode" to search (either my directory or the Web). If they choose "web" for the mode, then they will be redirected to another search engine result page.

Here is what I have done so far:

1) Edited sub main to look like the following:

Code:

sub main {
# ---------------------------------------------------
# Determine what to do.
#
my $in = new CGI;
my $dynamic = $in->param('d') ? $in : undef;
print $in->header();

if ($in->param('query')) {
&search ($in, $dynamic);
}
elsif ($in->param('mode') eq 'attech') {
&attech ($in, $dynamic);
}
elsif ($in->param('mode') eq 'wwwvl') {
&wwwvl ($in, $dynamic);
}
elsif ($in->param('mode') eq 'web') {
&websearch ($in, $dynamic);
}
elsif ($in->param('mode') eq 'books') {
&books ($in, $dynamic);
}
else {
my $title_linked = &build_linked_cgi_title ("Search Site");
&site_html_search_form ( { query => '', title_linked => $title_linked}, $dynamic );
}
}


2) Then I added the subs for the other search engine. Here is an example:

Code:

sub books {
#---------------------------------------------------------
# Searches Amazon.com

my ($in, $dynamic) = @_;
my $engine = "http://vlib.anthrotech.com/bin/amazon.cgi?keyword=";
my $redir = $in->param('query');
# Convert spaces to plus's
$redir =~ s/\ /+/g;
print $in->redirect ("$engine$redir&whichamazon=http://www.amazon.com&mymode=first&tag=anthrotechbookst");
}


This does not work...what happens is that a new result page appears adding mode=books to the query string. It does not redirect to the other search engines.

Any thoughts?

Thanks in advance (TIA).

Regards,

Eliot

Subject Author Views Date
Thread Other Search Engines Stealth 2440 Jul 29, 2000, 12:11 PM
Thread Re: Other Search Engines
pugdog 2345 Jul 29, 2000, 9:36 PM
Thread Re: Other Search Engines
Stealth 2345 Jul 29, 2000, 9:49 PM
Thread Re: Other Search Engines
pugdog 2340 Jul 30, 2000, 9:41 PM
Thread Re: Other Search Engines
Stealth 2342 Jul 30, 2000, 9:53 PM
Post Re: Other Search Engines
pugdog 2315 Jul 31, 2000, 9:03 AM