please i want to include google search in my site

Discussion in 'Shopping' started by crazy.works, Feb 14, 2009.

  1. #1
    hello ,
    i wanna put Google search in my site like the one on www.softarchive.net, so i generated the 2 codes from my adsense account .

    the 1st code for the input text search.php

    
    
    <form action="http://www.sitename.com/path/result.php" id="cse-search-box">
      <div>
        <input type="hidden" name="cx" value="partner-pub-0000000000:0000psjncgc" />
        <input type="hidden" name="cof" value="FORID:10" />
        <input type="hidden" name="ie" value="ISO-8859-1" />
        <input type="text" name="q" size="41" />
        <input type="submit" name="sa" value="Search" />
      </div>
    </form>
    
    <script type="text/javascript" src="/cse/brand?form=cse-search-box&amp;lang=en"></script>
    
    
    PHP:


    the 2st code for receive the result result.php

    
    
    <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>
    
    
    PHP:

    but the 2 codes doesn't work and i didnt recieve the the search result on result.php, i recived blank page ,so please help me to got it work .

    ,beside i wanna search on more than on site ,so how can i add more sites url on the code to got the search result from.

    thanks
     
    crazy.works, Feb 14, 2009 IP
  2. HydroJohn

    HydroJohn Active Member

    Messages:
    1,558
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    90
    #2
    I believe the site you need to do this is http://www.google.com/coop/cse/

    In the URL section just enter your domain and then it will be a specific search engine for your site, then just follow the instruction for how to embed it on your site.
     
    HydroJohn, Feb 14, 2009 IP
  3. SFOD_D223

    SFOD_D223 Peon

    Messages:
    4,512
    Likes Received:
    174
    Best Answers:
    0
    Trophy Points:
    0
    #3
    the second code is what you would place within your page space as the actual layout of where search results will show. You could use the second code for a "search form" page as long as you kept the "var googleSearchFrameWidth = 800;" within the space of the page you made available.

    The first code is what you could use as a generic non-branded search bar that will take your visitor's to google's search results formatted page.

    If you go to my site here you will see how I use regular search bar but with my own logo in results page.
     
    SFOD_D223, Feb 14, 2009 IP
  4. crazy.works

    crazy.works Peon

    Messages:
    304
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i got the script from http://multiz.com/google , it is free google search script , it is really cool .

    so i attached it , please tell me if it could work for my needs that i requested to search my site .

    thanks
     

    Attached Files:

    crazy.works, Feb 14, 2009 IP
  5. SFOD_D223

    SFOD_D223 Peon

    Messages:
    4,512
    Likes Received:
    174
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Why would you use another person's code embedded search? All you have to do is plugin what site links or domain pages you want to use. This can be done as you make up your search code on google adsense pages.
     
    SFOD_D223, Feb 14, 2009 IP
  6. crazy.works

    crazy.works Peon

    Messages:
    304
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    thanks i did it
     
    crazy.works, Feb 22, 2009 IP
  7. Plutoscript

    Plutoscript Peon

    Messages:
    202
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks to you all I once had the same problem but I was asked to do the same. We learn everyday. Thanks for all your advice men. I commend you for all your help at digitalpoint forum.
     
    Plutoscript, Feb 27, 2009 IP
  8. gh0st13

    gh0st13 Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Why would you use another person's code embedded search? All you have to do is plugin what site links or domain pages you want to use.
     
    gh0st13, Mar 17, 2009 IP