Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
August 25, 2008 - Time to Vote for the August 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 30, 2008, 06:04:03 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Adding a Google Search on Your Site  (Read 3029 times)
Danielle
Resident Alien
Administrator
Berserker Poster
*****
Offline Offline

Posts: 8853


nihil sunt omnia


WWW
« on: March 20, 2004, 01:09:09 PM »

Here is the code to add a Google search form to your site and ensure it is only searching for pages on your site that Google has spidered (you must have pages spidered by Google for this to work):

Code:
<script>
function CheckForm(e)
{
if( e.q.value=="" ){
alert('You must enter seach words');
e.q.focus();
return false;
}
e.q.value += " site:www.domain.com";
return true;
}
</script>
<hr>
<form name=abcd action="http://www.google.com/search" onsubmit="return CheckForm(this)">
<input maxLength=256 size=55 name=q value="">
<input type=hidden name=ie value="ISO-8859-1">
<input name=hl type=hidden value=en><br>
<input type=submit value="Google Search" name=btnG>
<input type=hidden name=meta value="">
</form>


Remember to replace www.domain.com with your domain name.

This code is courtesy of girish at www.langchat.com  Thumbs Up
Logged

Danielle Wallace
- nihil sunt omnia -
Lunarpages Webhosting ~ Lunarpages Forums ~ Lunarpages Affiliates
Administrator Training Manager - System Administrator Team


Ruby Asylum - For those crazy about Ruby
A&E Writing Forum ~ Best Garden ~ Endar & Endar Gallery ~ RatingBar.com

Every living creature on this earth dies alone.
Pete
Alien Anomaly
Professor in Nanotechnology
*****
Offline Offline

Posts: 4222



WWW
« Reply #1 on: March 21, 2004, 11:00:43 AM »

Danielle said
Quote
.........searching for pages on your site that Google has spidered (you must have pages spidered by Google for this to work):  


So..
er..  Embarassed
                 How do you know if youve been 'spidered'  Confused

      (Apart from little foot marks and cobwebs all over your body)
Logged

x-visions.com


As I'm always saying.. (But nobody listens)
"Take a step back.. Take a deep breath and see if there a simple solution there, thats hiding" lol  Very HappyLunarpages Web Hosting   Lunarpages Forums   Lunarpages Affiliate Program
Danielle
Resident Alien
Administrator
Berserker Poster
*****
Offline Offline

Posts: 8853


nihil sunt omnia


WWW
« Reply #2 on: March 21, 2004, 11:03:32 AM »

Hi Pete,

Well, you would put the code on your page and, if no results are returned, you haven't been. Razz

I hope this helps.  Wink
Logged

Danielle Wallace
- nihil sunt omnia -
Lunarpages Webhosting ~ Lunarpages Forums ~ Lunarpages Affiliates
Administrator Training Manager - System Administrator Team


Ruby Asylum - For those crazy about Ruby
A&E Writing Forum ~ Best Garden ~ Endar & Endar Gallery ~ RatingBar.com

Every living creature on this earth dies alone.
girish
Intergalactic Cowboy
*****
Offline Offline

Posts: 58


WWW
« Reply #3 on: March 22, 2004, 06:17:02 AM »

To know whether you have been spidered go to google.com and
search for

site:www.yourdomain.com


For a working sample of the search go to
http://www.langchat.com/search.asp

search for 'lunarpages' in that page. Thumbs Up
Logged
ryan.
Galactic Royalty
*****
Offline Offline

Posts: 307


« Reply #4 on: March 22, 2004, 11:27:50 AM »

Also, to know if someone else out there is linking to your site, just search google for

link:www.yourdomain.com

Note:  You may get different results if you use www or not.

ex: http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=link%3Alunarpages.com&btnG=Google+Search

ryan.
Logged

ryan.
sopidy
Spacescooter Operator
*****
Offline Offline

Posts: 44


WWW
« Reply #5 on: March 26, 2004, 03:49:03 PM »

is it possible to just add a google or yahoo search engine to a website? not necessarily to search in MY site.  i want my users to be able to make my page their home page & be able to make internet searches if they want to.
Logged
girish
Intergalactic Cowboy
*****
Offline Offline

Posts: 58


WWW
« Reply #6 on: March 27, 2004, 06:15:10 AM »

Sure just remove the following line from the above code
Code:

   e.q.value += " site:www.domain.com";


and then use that form.
Logged
robast2
Intergalactic Superstar
*****
Offline Offline

Posts: 134



WWW
« Reply #7 on: April 27, 2004, 07:26:30 PM »

Quote from: Danielle
Here is the code to add a Google search form to your site and ensure it is only searching for pages on your site that Google has spidered (you must have pages spidered by Google for this to work):

Code:
<script>
function CheckForm(e)
{
if( e.q.value=="" ){
alert('You must enter seach words');
e.q.focus();
return false;
}
e.q.value += " site:www.domain.com";
return true;
}
</script>
<hr>
<form name=abcd action="http://www.google.com/search" onsubmit="return CheckForm(this)">
<input maxLength=256 size=55 name=q value="">
<input type=hidden name=ie value="ISO-8859-1">
<input name=hl type=hidden value=en><br>
<input type=submit value="Google Search" name=btnG>
<input type=hidden name=meta value="">
</form>


Remember to replace www.domain.com with your domain name.

This code is courtesy of girish at www.langchat.com  Thumbs Up


What is benefit of having visiots leave your site via a search form?  Wink
Logged

Cheers,
Rob Aston
www.robaston.com
 
Mail     :     1 Princes Court,  2351 Cambridge, New Zealand
Phone :     + 64 7 827 7045
Email  :       rob@robaston.com
girish
Intergalactic Cowboy
*****
Offline Offline

Posts: 58


WWW
« Reply #8 on: May 01, 2004, 06:50:45 AM »

It is now official

Google has now officially allowed website owners to add a google
search to their website

http://www.google.co.in/searchcode.html
Logged
car-loan
Space Explorer
***
Offline Offline

Posts: 6



WWW
« Reply #9 on: May 02, 2004, 03:27:33 PM »

Having Google search on your site is a great way for people to find just what they're looking for in your content vs. having to follow navigation structure, etc.

Note that this search function specifically limits results to those from your site.

Cheers!
Logged

http://www.car-loan-wiz.com  - Car Loan Wiz provides auto loans info, tips on car loans, and a auto loan calculator - Find bad credit car loans or use our car loan calculator - Learn about auto loan rates and refinance car loan sources. Refinancing auto loans is easy with our low rate auto finance links.
Tito
Spacescooter Operator
*****
Offline Offline

Posts: 42


« Reply #10 on: July 19, 2004, 08:33:32 AM »

And if you want to make a little money, go to www.google.com/adsense.

You get the Google searchbar code specifically tailored for your site.  Search results open up in a different page with your logo on top.  If people click on the Google ads on top, you get paid.

If you're gonna give Google free advertising, might as well get something out of it.
Logged

I'm such a newbie.  Please forgive my ignorance.
JD
Galactic Royalty
*****
Offline Offline

Posts: 244



WWW
« Reply #11 on: July 31, 2004, 08:28:03 PM »

Google has sold there cyber soles. Get ready to see another dot/com tank before your cyber eyes. *L*
Logged

Put Down the Mouse and Step Away From the Computer.
cavarran
Space Explorer
***
Offline Offline

Posts: 6


« Reply #12 on: August 24, 2004, 02:41:33 PM »

How about web content stored in a database? How does google grab that? or does it? If not, what are some solutions to be able to search database driven websites? I really really need to know!

Peter
Logged
RickJ
"Tables Guy": In Tattoinese, that translates as
Über Jedi
*****
Offline Offline

Posts: 2643



« Reply #13 on: January 28, 2005, 06:40:37 AM »

I like the alternatives that picosearch.com and freefind.com offer.  With them you can be sure every single page in your site is searched when users search...without worrying, wondering, or digging around to find out if Google has spidered it.

The downside: The free versions have ads.  You pay to have them without ads.
Logged

Rick.
Trying to daydream, but my mind keeps wandering.

Ecumenical Apologetics | Affordable WebsitesSt. Gabriel Radio
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM