Search Submission Code

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dila125
Forum Newbie
Posts: 7
Joined: Fri Apr 09, 2004 7:11 am

Search Submission Code

Post by dila125 »

Does any know the easiest method of integrating a google add url submit box into my site?

I 've got the form to get the site address and comment box, and I know the url to send the data to, but how do I actually send it and how can I get the result from google and display it on my site?

The google add url page is at:
http://www.google.com/addurl.html

I have looked at some search engine submission scripts but all I could were far too advanced for what I need, with mysql databases and submission to 40 sites. I just need a simple form for google.
dila125
Forum Newbie
Posts: 7
Joined: Fri Apr 09, 2004 7:11 am

Post by dila125 »

My current code is:

Code: Select all

<form method=GET action="http://www.google.com/addurl"> 
    <input type=hidden name=q value="http://www.test.com" size=40 maxlength=256> 
    <input type=submit  value="Google" name="submit"> 
</form>
but how can I display a response on my site instead of going to the google site?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

although google probably frowns on this, but you can act as a proxy for the user's search. i.e. send a http query containing the data the form would normally pass to google. Read the returned html and parse out the data you want to display.
Post Reply