Jump to content

Site Search


Depco

Recommended Posts

I don't remember where I got this but here's a way to get Google to search your site only.

> <!-- SiteSearch Google -->
     <FORM method=GET action="http://www.google.com/search">
       <TABLE bgcolor="#FFFFFF">
         <tr>
           <td><A HREF="http://www.google.com/"> </A> </td>

           <td width="50%"><INPUT TYPE=text name=q size=31 maxlength=255 value="">
               <INPUT type=submit name=btnG VALUE="Google Search">
               <font size=-1>
               <input type=hidden name=domains value="http://www.******/">
               <br>
               <input type=radio name=sitesearch value="http://www.******" checked>
       Your Site Name Here
       <input type=radio name=sitesearch value="">
       The entire web <br>

             </font> </td>
           <td class="search">*Please be aware that recent changes may not appear in a Google search. </td>
         </tr>
       </TABLE>
     </FORM>
   <!-- SiteSearch Google -->

Hope it helps!

Link to comment
Share on other sites

Thanks, that's a great piece of code to have.

 

I copied this code into a test html page and tried it. Got great results but strangly when you try to search again from their results page it would not work.

 

I removed the last forward slash "/" from the

<input type=hidden name=domains value="http://www.******/">

line of code ind it worked great.

 

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...