I've sent the code to everyone who sent me an email. For the rest of you asking, I hope this works.
Just edit the list of URLs to be your area (hint: do a CL search and see what the URL for the finished search looks like and modify it below).
Once it is edited add it to your cgi-bin directory on your web server (which hopefully has Perl installed).
----------------------------------------
#!/usr/local/bin/perl
use CGI qw/:standard :netscape/;
use CGI::Carp qw(fatalsToBrowser carpout);
print header;
$frame_name = path_info();
$frame_name =~ s!^/!!;
# If no path information is provided, then we create
# a side-by-side frame set
if (!$frame_name) {
print_frameset();
exit 0;
}
# If we get here, then we either create the query form
# or we create the response.
print start_html();
print_query() if $frame_name eq 'left';
print_response() if $frame_name eq 'right';
print end_html();
# Create the frameset
sub print_frameset {
my $script = url();
print title('Net Quick Search'),
frameset({-cols=>'50%,50%'},
frame({-name=>'left',-src=>"$script/left"}),
frame({-name=>'right',-src=>"$script/right"})
);
exit 0;
}
sub print_query {
my $script = url();
print h1("Net Quick Search"),
start_form(-action=>"$script/right",
-target=>"right"),
"What are you searching for? ",
textfield('SearchItem'),
p(),
"This page will search several Craig's List sites and Ebay.<br>
If/When I can figure out the Amazon search format I will add that too.",
p(),
submit,
p(),
end_form;
}
sub print_response {
$ItemName=param(SearchItem);
print h2("Search for \"$ItemName\" at");
unless (param) {
print b("No query submitted yet."),
p(),
"This will search several Craig's List sites and Ebay";;
return;
}
#
# Modify these lines for your region
# Don't add anything between the EoText below and the
# EoText way below that you don't want on your web page.
#
print <<EoText;
<a href="http://monterey.craigslist.org/search/sss?query=$ItemName"
target="_blank">Monterey Craig's List</a>
<br>
<a href="http://sfbay.craigslist.org/search/sss?query=$ItemName"
target="_blank">SF Bay Area Craig's List</a>
<br>
<a href="http://stockton.craigslist.org/search/sss?query=$ItemName"
target="_blank">Stockton Craig's List</a>
<br>
<a href="http://sacramento.craigslist.org/search/sss?query=$ItemName"
target="_blank">Sacramento Craig's List</a>
<br>
<a href="http://search.ebay.com/search/search.dll?satitle=$ItemName"
target="_blank">Ebay</a>
EoText
}
----------------------------------------------------------
It could be a whole lot nicer. But I'm not a programmer. I just hacked this together and it shows. If any of you are programmers and want to make this a neater program it would be appreciated.
GK