|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Minimize the cost of deploying database applications. Advantage Database Server or Microsoft SQL Server – Which One is Right for You? Learn now! |
|
#1
|
|||
|
|||
|
Hello all!
Does anyone of you know how I can "piggyback" google for my site? Is there code out there for this or is it just a matter of linking up to them and hiding their icon (clueless about this also!)? I'm told that this is really simple to do but am unable to find out anything about it! Any help would be greatly appreciated by my dumb-***! By-the-by, this site will never be public so the google bods won't be wronged. |
|
#2
|
||||
|
||||
|
This might help
I think I know what you mean... so paste this code into your page:
<center> <FORM method=GET action="http://www.google.com/search"> <TABLE bgcolor="#FFFFFF"><tr><td> <A HREF="http://www.google.com/"> <IMG SRC="http://www.google.com/logos/Logo_40wht.gif" border="0" ALT="Google" align="absmiddle"></A> <INPUT TYPE=text name=q size=25 maxlength=255 value=""> <INPUT type=submit name=btnG VALUE="Google Search"> </td></tr></TABLE> </FORM> </center> if you don't like the logo image, you can choose a different one from http://www.google.com/stickers.html. Don't worry about 'wronging' anyone, Google take traffic wherever it comes from and encourage site owners to host their search box. Btw, you have the same name as my twin sister - Christo
__________________
. Spiration channels: Free scripts, programming tutorials and articles Dotcut alerts: Online Press cuttings / news alerts Clearprop: UK microlight school, wiltshire Uk dating: UK safe dating with Topdates About Christo . . |
|
#3
|
||||
|
||||
|
The thing is pretty simple for a normal search:
Just change the browser location to: http://www.google.com/search?hl=en&q=[*]&btnG=Google+Search and replace[*] with the escaped search term. For example: http://www.google.com/search?hl=en&...G=Google+Search that'll call the page with search results. Now you need to read the output of that into an array using php: $file = file("http://www.google.com/search?hl=en&q=find+me+some+food&btnG=Google+Search"); and parse it using: while (list ($line_num, $line) = each ($file)) { } what you're after is from the first line that starts with a <p> tag to the start of the last line that starts with a <p> tag. Then put this in your page and you should get the Google without the Google. It may need a bit of tidying up though! |
|
#4
|
|||
|
|||
|
Much obliged for your answers.
I'll try it out tomorrow and let you know. Thanks again, Laura ![]() |
![]() |
| Viewing: Dev Shed Forums > Other > Project Help Wanted > Piggyback Google? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|