Gossamer Forum
Home : Products : Links 2.0 : Customization :

Altavista results into Links

(Page 2 of 3)
> > > >
Quote Reply
Re: Altavista results into Links In reply to
hello, how would i put the search term like Macintosh+computers when the user types in Macinotsh computers?

------------------
-----------------------------------------------------
James Ribar
Webmaster http://ddo-rpms.hypermart.net/
Founder & Webmaster http://netace.hypermart.net

No More Searching! Find!
Use NetAce to find stuff on the internet quickly and effecently.
http://netace.hypermart.net

Get Your Free NetAce e-mail address @ http://netace.zzn.com

Quote Reply
Re: Altavista results into Links In reply to
Most of you may want to take a look at the below url:

http://www.chatologica.com/meta/manual.htm

There is a script which can search several
famous search engines and have their results printed on your page.
Quote Reply
Re: Altavista results into Links In reply to
Hi Rock,

yeah that's it! And really easy to add into links.

To everybody who want to see it in action I give a small explanation (because my site is in german):

Go to http://www.surfmaschine.de/pool

Type in any query you want and wait for the result page. You will find a link there calles "Meta - Suche". Klick it! There you go! Have fun.

If you have any questions let me know!

Best wishes


Michael
Quote Reply
Re: Altavista results into Links In reply to
Zoul, I tried it out and it works great! But there is one drawback to the Chatalogica Global Search script, it produces only 9 top results from each search module. The free one which is included in the demo script - the AltaVista module - produces only 9 references/results. I wrote to the author and he told me that he limit the results to 9 for bandwidth reasons. But what if bandwidth is not a concern, is there a way where we can hack the AltaVista module to shoot out 50 to 100 results as oppose to 9? Take a look at the script and see what we can do to improve the output.

John
Quote Reply
Re: Altavista results into Links In reply to
Hi John,

yes, would be great. I tried

foreach $i (1..9) {

to change to

foreach $i (1..19) {

but that didn't made any changes to the result. Well, I am no cgi programmer and have only little experiences in modifing scripts. If you come any further in this case, please let me know immediately.

Thanks!

Michael
Quote Reply
Re: Altavista results into Links In reply to
foreach $i (1..9) {

to change to

foreach $i (1..50) {

and

foreach $i (1.50) {

Yeah, I tried that too, but NO dice!

You know, there's a reason besides bandwidth, with regard to the limitation of 9 results per module. Maybe the author want us to buy ALL the module so the results would look more complete. Or maybe, looking at his demo - from the author's website - the results weren't too many either for search words like "microsoft". There could be some technical limitations to the script you know.

We need more input from others and maybe we can unleash the power of this great mod together with Links!

Just have to wait and see.

John
Quote Reply
Re: Altavista results into Links In reply to
Zoul, what is the code you use to put the link from the "Links search result to the link to the other alta vista page. What code call would put in what the user submitted and turn " " into "+"? Thanks in advance. James
Quote Reply
Re: Altavista results into Links In reply to
Hi Netace James,

here's the code:

<A HREF="http://www.surfmaschine.de/cgi-bin/meta/seek.cgi?tmpl= ../../pool/meta.html&page=1&what=$term"><strong>Met a - Suche starten</strong></A>

I put it in Site_html.pl in the "Search results" section.

Hope that helps.

Cheers

Michael
Quote Reply
Re: Altavista results into Links In reply to
Just an FYI, a while back Craig Antill was asking about placing the "+" in for spaces, and searching other search engines.

I recommended a tr/// for doing it.

His instructions for everyone else are linked from this thread:

http://www.gossamer-threads.com/...um3/HTML/000006.html

for some reason, this keeps putting a space after resources above. remove that or the url wont work

--Mark

------------------
You can reach me by ICQ at UIN #8602162




[This message has been edited by Mark Badolato (edited December 13, 1998).]

[This message has been edited by Mark Badolato (edited December 13, 1998).]
Quote Reply
Re: Altavista results into Links In reply to
Ok, now that we have a script that can meta-search AltaVista, how can we include this script as a "sub_routine" or whatever you call that into Links?

This is what I have in mind:

Normally, when you do a search for a word or phrase that is NOT in the Links' database, Links would shoot out the Search Failed page with the following error statement: "Error: no matching records".

Now, what if I wanted Links to go search the Meta search - Chatlogical Global Search - script after determining that there is nothing within the Links database and shooting out the results from AltaVista instead of the Search Failed page.

Any ideas?

Thanks!

John
Quote Reply
Re: Altavista results into Links In reply to
Furthermore...

http://www.mylinks.com/cgi-bin/meta/seek.cgi?what=$term&tmpl =search.html

FYI, this is a ficticious URL that will query Chatalogical Global Search script when inserted into Links failed page in site_html.pl file in the admin directory. But that's NOT what I want done. I want Links to automatically search the above URL when there is nothing found in Links' database. How can I do that?

John
Quote Reply
Re: Altavista results into Links In reply to
Here's something a lot simpler and more self contained. If you have the LWP module, this works well:

http://gossamer-threads.com/scripts/misc/altavista.cgi

Cheers,

Alex
Quote Reply
Re: Altavista results into Links In reply to
Alex, this is great. But, could you make it a bit easier to edit the style the links would show up in? I know you are busy with links beta 1.2, but when you get a chance, please do.

------------------
-----------------------------------------------------
James Ribar
Webmaster http://ddo-rpms.hypermart.net/
Founder & Webmaster http://netace.hypermart.net

No More Searching! Find!
Use NetAce to find stuff on the internet quickly and effecently.
http://netace.hypermart.net

Get Your Free NetAce e-mail address @ http://netace.zzn.com

Quote Reply
Re: Altavista results into Links In reply to
Help PLEASE.

Again, does anybody know how to increase the results output for this script?

There are 4 more required perl scripts that work together with this one.

Here's the file I think that needs to be tweak a little, so to speak, to allow more search results. I'm no perl programmer so can anyone look into this script:

require "/InetPub/wwwroot/cgi-bin/meta/cgi/http.pl";
require "/InetPub/wwwroot/cgi-bin/meta/cgi/mycgi.pl";
$what = &URLencode($ENV{'DATA_WHAT'});

&Altavista();
sub Altavista
{
local($buf,$var,$body,%res,$i,$j,$tag,$results) = ();
$var = "pg=q" .
"\&kl=XX" .
"\&q=$what" .
"\&search=Search";
$buf = &HTTPGet("/cgi-bin/query", "www.altavista.com", 80, $var);

foreach $i (1..9) {
$j = $i +1;%res = ();$tag = "";
$res{'search_engine'} = 'Altavista';
if($buf =~ m{<b>$i\. </b>(.+)<b>$j\. </b>}s){
$body = $1;
if ($body =~ m{^<a href=\"(.+)\"><b>(.*)</b></a>(.+)<b& gt;URL:</b>(.*)Last modified (\d+)-(\w+)-(\d+) - page size (.*K|.*bytes)( - in .*)?</font>}s){
$res{'URL'} = $1;
$res{'title'} = $2;
$res{'description'} = $3;
$res{'modified_day'} = $5;
$res{'modified_mon'} = $6;
$res{'modified_year'} = $7;
$res{'KB'} = $8;
if($9){
$res{'language'} = $9;
$res{'language'} =~ s/ - in //;
} else {
$res{'language'} = "English";
};
$res{'rate'} = $i;

$res{'description'} = &rm_tags($res{'description'});
if($res{'KB'} =~ s/bytes//) {
$res{'KB'} =~ s/ //g;
$res{'KB'} = $res{'KB'} /1000;
};
$res{'KB'} =~ s/B//i;
$res{'KB'} =~ s/K//i;

$tag = &ArrStr(\%res,\@res_data);
#print "line:" . $i . "$tag\n";
$results .= $tag;
};
};
};
$ENV{'DATA_FOUND'} ++;
&lock("../locks/$ENV{'QUERY_ID'}");
open(F,">>../buffer/$ENV{'QUERY_ID'}");
print F $results;
close(F);
&unlock("../locks/$ENV{'QUERY_ID'}");
return $results;
};

1;

If needed, I will post the additional 4 scripts that works in conjunction with the one listed above if so requested.

Thanks!

John


[This message has been edited by jmurphy (edited December 15, 1998).]
Quote Reply
Re: Altavista results into Links In reply to
Kudos to Alex - you're one hell of a guy! Excellent mod!

One thing that I would like to improve on is the search results to more than 10 - in subsequent pages of course. See below.

eg: Result Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [Next >>]
word count: microsoft: 714

How can we do this?

Thanks!

John
Quote Reply
Re: Altavista results into Links In reply to
Hi John,

why so excited? Alex' Mod Supports one search engine only. If that's enough for you, OK, it's nice then.

But did you manage to get the search results into your own page (into your own design)?

All the best


Michael
Quote Reply
Re: Altavista results into Links In reply to
If you want other search engines you need to do Is get someone who knows perl to modify The script slighly. All you need is a text format for the search engine.
I will star out fot hotbot use
http://www.hotbot.com/text/default.asp?MT=SearchString
Quote Reply
Re: Altavista results into Links In reply to
Alex, how do you get the output to also display subsequent link pages - on the top and bottom of the result page - as follows:

Result Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [Next >>]

See altavista text site here for an example:

http://www.altavista.com/cgi-bin/query?pg=aq&text=yes&kl=XX&r=walmart&act=search&q=&d0=&d1=

Thanks!

John

[This message has been edited by jmurphy (edited December 16, 1998).]
Quote Reply
Re: Altavista results into Links In reply to
I came across an interesting search engine yesterday that reformats searches from a few of the major search engines. The URL is: http://www.aesir.com/...staff/JimSearch.html

------------------
- Gilby -
mail@gilby.com
http://www.gilby.com
Quote Reply
Re: Altavista results into Links In reply to
I've been watching this thread and I just want to interject some reasoning here that seems to have been dropped by the curb earlier in the thread. Altavista (and other search engines) pay people lots of money to design their software that spiders web sites and then adds the sites to their search engine. Everything that several people in this thread want to strip out is what gives revenue to these companies.

As a word of warning, if you have never seen a full Apache (or any other web server) log, you would be amazed at the information that can be found out about you and what you were doing on a particular server. Legally, I'm sure that Altavista could claim that you were stealing their content and potentially file a lawsuit against you (and your site) for stealing content. Last year, a news service linked to most of the major news companies within a frame. Despite the fact that they were not removing anything from the sites within the frames, CNN sued the company and effectively put them out of business.

Honestly, I'm very impressed with what I see of this mod so far, I just don't want to see anyone end up getting sued or having their web sites taken down because of some corporate lawyers.
Quote Reply
Re: Altavista results into Links In reply to
Yes you raise a good concern... But I think that you would be ok.. Just get permission Smile

------------------
elitecaraudio.com
carforums.com


[This message has been edited by elite (edited December 18, 1998).]
Quote Reply
Re: Altavista results into Links In reply to
In AltaVista there is this disclaimer at http://www.altavista.com/...ntent/disclaimer.htm :

Quote:
The AltaVista search engine and the AltaVista index are the property of Compaq Computer Corporation. You may not, without express permission from Compaq, take the results from an AltaVista search and reformat and display them. You also may not mirror the AltaVista home page or results pages on your Web site.

If anyone here gets permission from them to use it on their site please let us know.

------------------
- Gilby -
mail@gilby.com
http://www.gilby.com
Quote Reply
Re: Altavista results into Links In reply to
Well I updated the altavista script to now display the total hits as well as next hits toolbar. Take a look at:

http://gossamer-threads.com/...s/misc/altavista.cgi

Also, I came across WWW::Search module (man I love perl, there is a free module for everything). This module provides a nice oo interface to search one of many popular engines and reformat the results (beware the legalities of this though)! You can find it at:

http://www.isi.edu/...WW_SEARCH/index.html

If anyone makes anything out of it, I'd be interested to see.

Cheers,

Alex
Quote Reply
Re: Altavista results into Links In reply to
Alex, I tried the new script from your site for words such as 'microsoft' and 'macs'

For 'microsoft' the results were:

page: 0 numhits: 9969187 maxhits: 10 nh: 1 i: 16 upper: 15 lower: 1

These results were pulled out of Altavista and are for demonstration purposes only!

A total of 9,969,187 web pages were found.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ... [>>]

------------

For 'macs' the results were only 10:

Exiting3page: 0 numhits: 0 maxhits: 10 nh: 1 i: 1 upper: 8 lower: -6

These results were pulled out of Altavista and are for demonstration purposes only!

A total of web pages were found.
1

-----------

Judging from the above 2 searches, we know for the fact that search word "macs" have 310240 web pages according to AltaVista. This is what I got doing the search from AltaVista's website:

for the term "macs"
AltaVista found 310240 Web pages for you.

Why does it work for one word and not for the other?

Strange isn't it??

John
Quote Reply
Re: Altavista results into Links In reply to
One more thing, how do you get rid of this line from the output html page:

page: 0 numhits: 13424737 maxhits: 10 nh: 1 i: 16 upper: 15 lower: 1

Is there a way where you can mask it?

Thanks,

John
> > > >