Saturday, May 18, 2013

GOOGLE ADSENSE AD FOR SEARCH

2 Types of Search

--------------------------------------------------------------------------------

  • Search Only Website
<!-- Start SEARCH BOX CODE: -->
<form action="http://www.domain.com/search.php" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="partner-pub-2151667935419035:q45vhyd7p65" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="text" name="q" size="31" />
<input type="submit" name="sa" value="Search" />
</div>
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
 <!-- End SEARCH BOX CODE -->
 <!-- Start SEARCH RESULT CODE -->
 <div id="cse-search-results"></div>
<script type="text/javascript">
var googleSearchIframeName = "cse-search-results";
var googleSearchFormName = "cse-search-box";
var googleSearchFrameWidth = 800;
var googleSearchDomain = "www.google.com";
var googleSearchPath = "/cse";
</script>
<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>
 <!-- End SEARCH RESULT CODE -->

--------------------------------------------------------------------------------
  • Search Entire Google Web
<!-- Start SEARCH BOX CODE: -->
<form action="http://www.domain.com/search.php" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="partner-pub-2151667935419035:q45vhyd7p65" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="text" name="q" size="31" />
<input type="submit" name="sa" value="Search" />
</div>
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
 <!-- End SEARCH BOX CODE -->
 <!-- Start SEARCH RESULT CODE -->
<div id="cse-search-results"></div>
<script type="text/javascript">
var googleSearchIframeName = "cse-search-results";
var googleSearchFormName = "cse-search-box";
var googleSearchFrameWidth = 800;
var googleSearchDomain = "www.google.com";
var googleSearchPath = "/cse";
</script>
<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>
 <!-- End SEARCH RESULT CODE -->

ENJOY :)