Gossamer Forum
Home : Products : Links 2.0 : Customization :

Autodisplay altavista.cgi

Quote Reply
Autodisplay altavista.cgi
Does anyone know what command line is needed if I wanted to display a link from the Links search results to look in Alta Vista like Yahoo does with their [Web Page Results]?
Quote Reply
Re: Autodisplay altavista.cgi In reply to
I am also looking for a way to do this. Please let me know if you figure anything out.



------------------
The RelayMan
simsearch.hyperart.net
mdhealyjr@adelphia.net
Quote Reply
Re: Autodisplay altavista.cgi In reply to
not sure if this is what you are looking for it was written by Craig Antill (Sorry Craig if I spelt that wrong.)

Introduction
This is a modification to Gossamer Threads' Links Engine 1.1 which I was asked to implement on a site I was working on. It is a pretty straightforward mod which will allow you to show a 'now search these engines...' feature.
It allows that when a search on the database is made, either successful or not, that the user is presented with the option to carry out a further search on various other search engines. This is similar to the option you have on Yahoo! after a similar search.



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


Instructions
First of all, do the sensible thing - BACK ALL YOUR FILES UP!!! this includes all files in /links and /links/admin. I can't, and won't, be responsible for any errors - self induced, or otherwise - which result from this modification...

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

Open search.cgi and make the following changes:
In sub main, follow this section:

# Boolean connector defaults to "and".
if (!$in{'bool'}) { $in{'bool'} = 'and'; }

Add this:
# Stores the query in $term seperated by a +
$term = $in{'query'};
$term =~ tr/ /+/;



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

Open site_html.pl and make the following changes:
Add these lines to sub site_html_search_results where you wish it to be output:

Now Try This Search On:
<BR><BR>
<A HREF="http://www.infoseek.com/Titles?qt=$term">Infoseek</A> |
<A HREF="http://www.altavista.digital.com/cgi-bin/query?q=$term">Altavista</A> |
<A HREF="http://search.yahoo.com/bin/search?p=$term">Yahoo</A> |
<A HREF="http://search.excite.com/search.gw?search=$term">Excite</A> |
<A HREF="http://www.hotbot.com/?MT=$term">Hotbot</A> |
<A HREF="http://www.lycos.com/cgi-bin/pursuit?matchmode=and&cat=lycos&query=$term">Lycos</A>

Finally, add these lines to sub site_html_search_failure where you wish it to be output:
Search Again? Use the search form below to search the $site_title database, or select any of these fine search engines to search their more general databases
<BR><BR>
Try This Search On:
<BR>
<A HREF="http://www.infoseek.com/Titles?qt=$term">Infoseek</A> |
<A HREF="http://www.altavista.digital.com/cgi-bin/query?q=$term">Altavista</A> |
<A HREF="http://search.yahoo.com/bin/search?p=$term">Yahoo</A> |
<A HREF="http://search.excite.com/search.gw?search=$term">Excite</A> |
<A HREF="http://www.hotbot.com/?MT=$term">Hotbot</A> |
<A HREF="http://www.lycos.com/cgi-bin/pursuit?matchmode=and&cat=lycos&query=$term">Lycos</A>

Bob Wirth
Wirthit.com
Quote Reply
Re: Autodisplay altavista.cgi In reply to
 Oh, thanks! That's not what I was looking for, but I can deffinately use that right before the footer of the results.

Actually.. this is what I am wanting to do
using the 'altavista.cgi' script. The way it is set up as a demo on Gossamer you need to enter a query again to get the results. There is no documentaion for altavista.cgi that I am aware of so...

I want to insert a link right below the 'Links' results that a user can click on to pull the results from altavista using the SAME query he just searched for without having to type it in another field. Or in other words, automatically transfer the pre-inputed query to the altavista.cgi search and activate it by a click (and not re-enter the query into an additional field).

like have the hyperlink as: http://www.domain.com/cgi-bin/altavista.cgi?query

Where 'query' was whatever the user entered to search links originally.

I'm not a programmer, I'm just good at the cutting and pasting of pre-written programs, so I'm not sure how to explain this. If anyone has done this, or know how, please let me know! Smile

Thanks again.



Quote Reply
Re: Autodisplay altavista.cgi In reply to
If you have done the above implementation you already have the following variable:

$term

You will use it in the code below. If you do not have it then you can do the following:

Under "Globals" in site_html.pl put this line:

$search_keywords= @search_terms;


Now wherever you prefer in your search results page you can use the below code:

<FORM action="http://yourdomain.com/cgi/altavista.cgi" method="GET">
<INPUT type="hidden" name="query" value="@search_terms">
<FONT color="#000000" size="2" face="verdana, arial"><STRONG>MetaSearch Results for: @search_terms</STRONG></FONT>
<INPUT type="submit" value="Show me"></FORM>

Where you see @search_terms you can use $term
if you have already done the other implementation. Both will work fine.

Hope that helps


Volpi

[This message has been edited by volpi (edited February 07, 1999).]
Quote Reply
Re: Autodisplay altavista.cgi In reply to
That was it Volpi! Thanks! Wink
Quote Reply
Re: Autodisplay altavista.cgi In reply to
Thanks for visiting my website!

I believe this is possible. We would just have something similar to altavista.cgi. I do not know perl enough to make this, but i know it's possible. Wink

Eduardo Volpi
Quote Reply
Re: Autodisplay altavista.cgi In reply to
Volpi,

I think your site is pretty cool...

I do have a question for you. I think you got to integrate search results of amazon.com on your site to. Is there a way to show the results in your website instead of amazon.com even though it probably is not allowed?

Thanks in advance,
elms

[This message has been edited by elms (edited February 08, 1999).]
Quote Reply
Re: Autodisplay altavista.cgi In reply to
You can find an individual script just like that at www.anaconda.net , however it costs $40 - but it works like a charm...Try the demo on their page. They say it doesn't modify the associates agreement and terms in any way. If anybody would tell me where in the world I can get this altavista.cgi script, i could try and modify it so that it works just like normal but for amazon.com, and it would be free...



------------------
Regards,
Brian
mjordn12@aol.com
veggietales.virtualave.net/veggielink/ (MegaLinks2.0)



[This message has been edited by mjordn12 (edited February 21, 1999).]
Quote Reply
Re: Autodisplay altavista.cgi In reply to
 You can find it at
http://gossamer-threads.com/scripts/misc/altavista.cgi

Nobody told me, I had to ask Alex...
Quote Reply
Re: Autodisplay altavista.cgi In reply to
Brian,

I tried fooling around with that, but I don't know perl. I was able to dump the results on my page. But it is not parsing properly. Along with links it also dumps "images" (the top nav bar of amazon) and the contents of the side bar.

Secondly the links displayed have to referenced directly to amazon ie currently all are displayed /exec/obidos...(meaning full links will refer to your site and not amazon) so you have to make sure it is referenced back to amzon instead of your site.

Here is what I tried replacing with the original

my $url = "http://www.amazon.com/exec/obidos/external-search?keyword=$query_q&text=yes&stq=$page";

Hope to hear back from you here.
Thanks

Quote Reply
Re: Autodisplay altavista.cgi In reply to
Hello all,

You can certainly spend considerable time reworking the altavista.cgi script into one for Amazon.com. But it is a bit more complicated than it appears. Remember to deal with the relative image links that must be "mangled" to point to amazon proper, the several different result sets depending on multiple/single/no hits, the color scheme (it is ugly), don't forget to modify each and every book link to be hardlinked with your amazon associate code for 15% commissions, and the hardest one of all...the "more" button at the end...just *try* to get that working.

We have worked for many days getting the Anaconda! product to work flawlessly. It is fully supported (as it depends on the exact structure of Amazon.com pages, if they change, so must Anaconda!).

Please feel free to take it for a test drive at http://www.anaconda.net

Note: due to popular demand we have implemented a Barnes and Noble version for those of you that are affiliates. It can be found at http://www.anaconda.net/indexbnn.shtml

Cheers,
Author - Anaconda!
anaconda@anaconda.net

PS. Why re-invent the wheel?
Quote Reply
Re: Autodisplay altavista.cgi In reply to
Okay Anaconda,

I purchase the script, installed it and no go. The error I am getting is:

Code:
Anaconda Script Sample Template
--------------------------------------------------------------------------------
We were unable to find exact matches for your search.

Amazon.com search results by Anaconda!


--------------------------------------------------------------------------------
Anaconda Script Sample Template

It is in the cgi-bin and permissions are set properly for the script.

The location of the link for the form page is here:

www.webmerch.com/booksearch.html

Perl path is /usr/bin/perl so that nothing was modified from original.

Need help, seems like it is not retrieving from amazon.com as it is supposed to.

I emailed anaconda@anaconda.net

I do not know if it is worth the $40 yet...

Is there any FAQs for this script...

Thanks in advance,
elms

[This message has been edited by elms (edited February 24, 1999).]
Quote Reply
Re: Autodisplay altavista.cgi In reply to
Elms:

I see from your subsequent email and your site that you got Anaconda up and running just fine within a few minutes. The "error" that you were getting is actually Amazon telling you that they don't have any books that match the search criteria that you provided.

Let us know how things go. I'm sure you've discovered by now that it is well worth the $40.

Please post your results here.

Regards,
Anaconda
Quote Reply
Re: Autodisplay altavista.cgi In reply to
Dear "Anaconda"

I donīt think fair you want $40 for the Anaconda without letting us to see the source, if itīs simple or not. Remember that two of the bests scripts on the web are a kind of shareware, Links Manager and WebAdverts. I think you should do the same.
They do this (let us to see the source) because they know we will like a lot the script that we will pay...

Quote Reply
Re: Autodisplay altavista.cgi In reply to
actually,

I know there were results using the keyword "grants" or "computers": because I tried it using some of the techniques metioned on these boards searching amazon.com about searching books but it never displayed on the my page like anaconda.pl script. The script is worth it, it might have to do with amazon.com as to why the results where not displaying...I did not mean anything about any of the comments I made...I was just concerned since anaconda.net was claiming such an easy installation and something out of the blue happened that was not related to the script

Best wishes,
elms
Quote Reply
Re: Autodisplay altavista.cgi In reply to
tmoretti:

I'm confident that anyone purchasing Anaconda will be pleased with the product. We have sold more than 100 and haven't had a single return. The quotes on our home page - <http://www.anaconda.net> are real!

Elmer's problem turned out to be unrelated to the script. Had their been a real problem we would have been very eager to get to the bottom of it.

The $39.95 that you pay for our script seems very reasonable - if not on the LOW side. Remember, everyone using Anaconda should be able to make the $39.95 back in increased commissions and page views in just a few weeks. The product starts making money for you the instant you install it!

Also remember that the $39.95 pays us for the idea, for the hours of programming, for our hosting, for our credit card processing and for advertising.

Go ahead and try Anaconda. You won't regret it.

http://www.anaconda.net
Quote Reply
Re: Autodisplay altavista.cgi In reply to
This is getting really off topic, so I've closed the thread. Please, if it's not related to Links, move it over to the general Perl and CGI forum.

Cheers,

Alex