![]() |
|
Tutorial [PHP] Google Search For Your Site - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: PHP (https://sinister.ly/Forum-PHP) +--- Thread: Tutorial [PHP] Google Search For Your Site (/Thread-Tutorial-PHP-Google-Search-For-Your-Site) |
[PHP] Google Search For Your Site - Mediocrity - 05-29-2013 This is a piece of source code of which i have used many times on a variety of my websites, it is the best and most accurate source code
you could possibly use if you're thinking of implementing a searching section into your website. Code: <form method="get" action="http://www.google.com/search">
<div style="border:1px solid black;padding:4px;width:20em;">
<table border="0" cellpadding="0">
<tr><td>
<input type="text" name="q" size="25"
maxlength="255" value="" />
<input type="submit" value="Google Search" /></td></tr>
<tr><td align="center" style="font-size:75%">
<input type="checkbox" name="sitesearch"
value="YOUR WEBSITE URL GOES HERE" checked /> only search My Url<br />
<br/>This Google Script Was Coded By Mediocrity At http://www.sinister.ly/
</td></tr></table>
</div>
</form>The above code is a very easy and very basic google search of which you may add to your site. You DO have to change two(2) things 1). Change the value of the site search to your url (where i put `YOUR WEBSITE URL GOES HERE`) 2). also in my google search codes i like to give the searchers a option of searching only your website or going out of the site to find information about the search on different sites. So where i put `only search My Url` You should really change the My Url To your real website address Also the code above will open the google search on the searchers current window therfore if you would like the searchers to open a new tab upon the search then replace the top line with this code Code: <form method="get" action="http://www.google.com/search" target="_blank">Thanks ![]() Mediocrity RE: [PHP] Google Search For Your Site - i0xIllusi0n - 05-29-2013 Not bad, some people could use this. Plus you can customize it by using Google dorks. inurl: intext: intitle: etc RE: [PHP] Google Search For Your Site - Mediocrity - 05-29-2013 (05-29-2013, 02:26 AM)i0xIllusi0n Wrote: Not bad, some people could use this. Plus you can customize it by using Google dorks. Yes absolutely it's fully customizable and capable of many things. Dorks etc... RE: [PHP] Google Search For Your Site - i0xIllusi0n - 05-29-2013 (05-29-2013, 02:29 AM)Mediocrity Wrote: Yes absolutely it's fully customizable and capable of many things. Dorks etc... That's exactly what I said, you just repeated it. |