Infinity99 Posted January 31, 2008 Share Posted January 31, 2008 Hello,all Recently I saw many website embedded google search to it's site.I want to do it too.But,the question is I just want to embed google to my site so people can search google from my site,but if people want to search only about my site I've already make the search form for it. Can I use 2 type of search in my site?I've already googled it and the one I found is using google to search both (google and site) .can anyone help me? Quote Link to comment https://forums.phpfreaks.com/topic/88704-helpadd-google-to-my-site/ Share on other sites More sharing options...
rajivgonsalves Posted January 31, 2008 Share Posted January 31, 2008 did not get your question its not very clear. do you want to search your site using google, or you want to use google to search the internet through your site ? Quote Link to comment https://forums.phpfreaks.com/topic/88704-helpadd-google-to-my-site/#findComment-454222 Share on other sites More sharing options...
Infinity99 Posted February 1, 2008 Author Share Posted February 1, 2008 I just want to embed google search to my web so people can search with google from my web.It's like get google form to my site and after I click search it open google with search result. But if people want to search all about my site example like product or forum,I want to use my search script. Can it be done?I've tried to search it and the one I found is by get the search term then use header("Location:http://www.google.com/search?hl=en&q=my+search+term") but it failed.It just open google without the search term. Quote Link to comment https://forums.phpfreaks.com/topic/88704-helpadd-google-to-my-site/#findComment-455073 Share on other sites More sharing options...
Dada78 Posted February 1, 2008 Share Posted February 1, 2008 What you are looking for is really simple. It is actually a part of Google Adsense. If you don't have it sign up and you will be able to get the code that is called Adsense for search. It will allow users to search google within just your site or the web. What is nice is if they search the web with it you will get paid. Just sign up and then you just enter all your information and it will give you the code to embed in your site. You can go directly to Adsense and get started and just click on Adsense for Search. https://www.google.com/adsense/static/en_US/WsOverview.html Quote Link to comment https://forums.phpfreaks.com/topic/88704-helpadd-google-to-my-site/#findComment-455081 Share on other sites More sharing options...
blueman378 Posted February 1, 2008 Share Posted February 1, 2008 i believe this is what you are looking for? <!-- Search Google --> <FORM method=GET action="http://www.google.com/search"> <INPUT TYPE=text name=q size=20 maxlength=255 value=""> <INPUT type=submit name=btnG VALUE="Search"> </FORM> <!-- Search Google --> and of course if you want the google logo | <!-- Search Google --><img src="www.google.com/logos/(get your image here http://www.google.com/stickers.html).gif"><br> <FORM method=GET action="http://www.google.com/search"> <INPUT TYPE=text name=q size=20 maxlength=255 value=""> <INPUT type=submit name=btnG VALUE="Search"> </FORM> <!-- Search Google --> that code is suprisingly difficlut to come by now as google is constantly changing coeds but here you go still works Quote Link to comment https://forums.phpfreaks.com/topic/88704-helpadd-google-to-my-site/#findComment-455192 Share on other sites More sharing options...
Infinity99 Posted February 4, 2008 Author Share Posted February 4, 2008 @blueman378 thanks blueman,but that is not what i'm looking for because in my logic the form action I have to use other php file,such as searchresult.php and then in searchresult.php I will divide using If,so If the user choose google,I will leave the search to google but if the user choose search my site,I will use query from my database. Still,thank you for your response. I think I will try @Dada78 solution first.Hope I can get the code so I can embed it in my code Quote Link to comment https://forums.phpfreaks.com/topic/88704-helpadd-google-to-my-site/#findComment-457395 Share on other sites More sharing options...
Lamez Posted February 4, 2008 Share Posted February 4, 2008 take a look here: http://adsense.google.com Quote Link to comment https://forums.phpfreaks.com/topic/88704-helpadd-google-to-my-site/#findComment-457400 Share on other sites More sharing options...
mikefrederick Posted February 4, 2008 Share Posted February 4, 2008 go to www.truegraphic.com is the search from the homepage what you are looking for? Quote Link to comment https://forums.phpfreaks.com/topic/88704-helpadd-google-to-my-site/#findComment-457401 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.