Sunday, April 22, 2012

Using Google to search only your site



You may not want to  spend  time  to design a search engine to search over your website.  Yes, you can use Google to search only over your site. For example, I want to search "Canada Economy 2012" only in tsx.com. I just need to input "site:tsx.com, Canadian economy 2012" in Google search. All results are from tsx.com.  Similarly, if you used " site:money.cnn.com", then all results are from money.cnn.com.

Below is the example to search the content in  the website checked (only one website allowed to be checked)
Source code:
 <form action="http://www.google.com/search" method="get" target="_blank">
<input maxlength="255" name="q" size="25" type="text" value="" />
<input type="submit" value="Google Search" /><br />
<input name="sitesearch" type="checkbox" value="video.yahoo.com" />video.yahoo.com <br />
<input name="sitesearch" type="checkbox" value="www.youtube.com" /> www.youtube.com <br />
<input name="sitesearch" type="checkbox" value="www.dailymotion.com" />www.dailymotion.com <br />
<input name="sitesearch" type="checkbox" value="www.truveo.com" /> www.truveo.com </form>

Result:


video.yahoo.com
www.youtube.com
www.dailymotion.com
www.truveo.com

No comments:

Post a Comment