Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Multi-Site Search

  1. #1
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts

    Multi-Site Search

    I am looking to create a web page or script where I enter one string and it searches Google for that string across 300+ different web sites.

    For example, I enter the word "boxing" and it searches a pre-configured list of 300 web sites for the word "boxing" using Google's site: operator.

    The web page or script would be only for my use. I could distribute it freely for other people to us, but my copy would only need to work for me.

    Anyone have suggestions on how to build this beast? Right now I'm stuck way back at the "How can I have more than one onClick on a submit action in an HTML form?
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  2. #2
    Abdullah is offline Newbie Net Builder
    Join Date
    Feb 2009
    Posts
    11
    Thanks
    12
    Thanked 6 Times in 5 Posts
    As we discussed on chat, the code pasted below solves the problem (almost ). It relies on using multiple instances of the "site:" operator, separated by ORs. Since a single search can have a limited number of terms, searching 300 sites is not possible in one go and needs to be divided into categories.

    The code includes two sample categories, technical sites and how to sites. More categories can be added in a similar way, although it will be better if a separate function is created for this purpose.

    The lists of sites need to be specified in the array variables at the beginning of the script. Since Google allows a maximum of 32 search words, the number of sites should be 31 or less in each category, assuming a single search term. So, 300 sites will require more than 10 categories.

    HTML Code:
    <html><head>
      <script type="text/javascript">
       
      var techSites = ['tech-faq.com', 'systemdisc.com', 'symatech.net', 'iqio.org', 'rolo.org', 'explaintechstuff.com']; // add other sites
       
      var howToSites = ['ihowd.com', 'iaskd.com', 'howtodothesethings.com', 'bestinlife.net']; // add other sites
       
       
      var techString="";
      if (techSites.length > 0)
      {
          techString = " site:" + techSites[0];
          for (var i=1; i<techSites.length; i++) {
                      techString += " OR site:" + techSites[i];
          }
      }
       
       
      var howToString="";
      if (howToSites.length > 0)
      {
          howToString = " site:" + howToSites[0];
          for (var i=1; i<howToSites.length; i++) {
                      howToString += " OR site:" + howToSites[i];
          }
      }
       
      function submitTechForm() {
          open("http://www.google.com/search?q=" + document.getElementById("techTextBox").value + techString + "&lr=lang_en");
      }
       
      function submitHowToForm() {
          open("http://www.google.com/search?q=" + document.getElementById("howToTextBox").value + howToString + "&lr=lang_en");
      }
       
      </script>
       
      </head><body>
      <form action="javascript:submitTechForm()">
      <input name="q" id="techTextBox" type="text"><input value="Search Tech Sites!" type="submit"> 
      </form>
       
      <form action="javascript:submitHowToForm()">
      <input name="q" id="howToTextBox" type="text"><input value="Search How To Sites!" type="submit"> 
      </form>
       
      </body></html>
       
    Hope that helps!
    Last edited by Abdullah; 23 April, 2009 at 15:04 PM.

  3. Thanked by:

    Will.Spencer (23 April, 2009)

  4. #3
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    This is going to make building links to new sites so much easier!
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  5. #4
    rome9t9's Avatar
    rome9t9 is offline No Longer Loves SEO
    Join Date
    Mar 2009
    Location
    If I tell you, I would have to kill you.
    Posts
    614
    Blog Entries
    4
    Thanks
    168
    Thanked 105 Times in 77 Posts
    Though I cant help, but I would like to see this in action..may be get a copy too if you wish..

    Good Luck

  6. #5
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts
    You know you might have too many sites when you need to have your own search engine built

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  7. #6
    Abdullah is offline Newbie Net Builder
    Join Date
    Feb 2009
    Posts
    11
    Thanks
    12
    Thanked 6 Times in 5 Posts
    Quote Originally Posted by rome9t9 View Post
    Though I cant help, but I would like to see this in action..may be get a copy too if you wish..

    Good Luck
    To see it in action, copy and paste the code into a .html file. Open that file, and voila! - you can enter your search terms.

  8. Thanked by:

    rome9t9 (24 April, 2009)

  9. #7
    thesyndicate is offline Newbie Net Builder
    Join Date
    Jul 2009
    Location
    NET<>DP
    Posts
    138
    Thanks
    14
    Thanked 5 Times in 4 Posts
    You mean you use this to find things that is relevant to your website?

    I was looking for something simliar but for diffrent social networks like search all social network for a email adress. Does anybody have that?

  10. #8
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    Quote Originally Posted by thesyndicate View Post
    You mean you use this to find things that is relevant to your website?
    I use this to find pages on my websites. I have more pages than any human being could ever hope to remember.

    Quote Originally Posted by thesyndicate View Post
    I was looking for something simliar but for diffrent social networks like search all social network for a email adress. Does anybody have that?
    Just delete my site names from the script and replace them with the names of the various social networking sites.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  11. #9
    thesyndicate is offline Newbie Net Builder
    Join Date
    Jul 2009
    Location
    NET<>DP
    Posts
    138
    Thanks
    14
    Thanked 5 Times in 4 Posts
    i do not think that will work do you? Do you need to be logged in to some of them? I more thinking of a script that log in to 30 diffrent sites and search for a name or email. But otherwise the script is cool.

    Btw why dont you use Googles own search and make a private SE and add all your domains in there.

  12. #10
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    Quote Originally Posted by thesyndicate View Post
    i do not think that will work do you? Do you need to be logged in to some of them? I more thinking of a script that log in to 30 diffrent sites and search for a name or email. But otherwise the script is cool.

    Btw why dont you use Googles own search and make a private SE and add all your domains in there.
    This script does use Google. It's a shell for Google search that builds the proper search queries for us.

    If you need to login to different sites and use thirty different search engines, you have a much larger coding exercise ahead of you.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

Page 1 of 2 12 LastLast

Similar Threads

  1. wordpress search for multi wp DB
    By SonnyCooL in forum Wordpress
    Replies: 3
    Last Post: 18 January, 2011, 04:42 AM
  2. [WTS] Mp3 Search Engine Site
    By ChaoscripT in forum Sites
    Replies: 12
    Last Post: 30 September, 2010, 03:37 AM
  3. [WTS] Nice looking video search site
    By memenode in forum Sites
    Replies: 0
    Last Post: 1 December, 2009, 15:17 PM
  4. Replies: 0
    Last Post: 1 December, 2009, 11:36 AM
  5. Submit your site to top 66 search engines
    By abhishesh in forum Scripts
    Replies: 1
    Last Post: 4 July, 2009, 21:15 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •