in reply to Re: query from more than one search engine
in thread query from more than one search engine

that is what i do.. i put the the strings like the one up there. but, i could only put 1 string/address..not 3...that is my problem....how do i put 3 strings/addresses? ..or how do i make the query passes at least 3 search engine before giving the results?
  • Comment on Re: Re: query from more than one search engine

Replies are listed 'Best First'.
Re: Re: Re: query from more than one search engine
by fuzzysteve (Beadle) on Nov 27, 2001 at 16:10 UTC
    you'll have to grab all three (seperate calls), parse out the links, then compile a page from those links.
    pseudo code:
    page1=grab link1 into variable; page2=grab link2 into variable; page3=grab link3 into variable; define an array of hashs; parse links from page1 pushing into the array; parse links from page2 pushing into the array; parse links from page3 pushing into the array; weight the array in a sensible fashion; output page using the array;
      need help here..these are my problem areas..

      my $new_url = "http://www.google.com/search?q=$a" ;
      my $new_url = "http://hotbot.lycos.com/?MT=$a" ;
      my $new_url = "http://www.altavista.com/sites/search/web?q=$a&kl=XX&pg=q" ;



      # HERE IS ONE TOO. I CAN'T PUSH THE STRING INTO THESE VARIABLES.
      open(OUTF,">subject1.html") or dienice("Can't open subject1.html for writing: $!");
      open(OUTF,">subject2.html") or dienice("Can't open subject2.html for writing: $!");
      open(OUTF,">subject3.html") or dienice("Can't open subject3.html for writing: $!");
        If that really is a code snippet, it looks like you need to take a basic programming course. When you say
        my $new_url = "http://www.google.com/search?q=$a" ; my $new_url = "http://hotbot.lycos.com/?MT=$a" ; my $new_url = "http://www.altavista.com/sites/search/web?q=$a&kl=XX&pg +=q" ;
        you are assigning three different values to the same place in memory, one after another, without doing anything to them.

        If, as others have suggested, this is homework, you should seek help quick. Go immediately to your teacher and show them how far you have got. You may feel stupid doing this, but feeling stupid is part of learning.

        On the other hand, if you have a better idea of what your doing than you post seems to suggest, you need to supply some error messages, and MORE CODE, so that the monks can help you further.

        - Boldra