anon Posted May 24, 2007 Share Posted May 24, 2007 ??? Is it possible to have something that will mimic google, and when you type something into a search box, it searches for it via Google. For example, i have a site. It has a search box on it. when you type something in, it searches for it through Google. Don't have a clue. Quote Link to comment https://forums.phpfreaks.com/topic/52815-doing-an-outside-google-search/ Share on other sites More sharing options...
trq Posted May 24, 2007 Share Posted May 24, 2007 Search google, they have there own API's for this. Quote Link to comment https://forums.phpfreaks.com/topic/52815-doing-an-outside-google-search/#findComment-260745 Share on other sites More sharing options...
penguin0 Posted May 24, 2007 Share Posted May 24, 2007 On google, they have somthing that will give you the code for this. Look in there labs, or you might have to be a member of adsense or somthing. Quote Link to comment https://forums.phpfreaks.com/topic/52815-doing-an-outside-google-search/#findComment-260748 Share on other sites More sharing options...
anon Posted May 24, 2007 Author Share Posted May 24, 2007 Thanks for the help, but i don't want it to be a mini search, i want it to be the whole page. Quote Link to comment https://forums.phpfreaks.com/topic/52815-doing-an-outside-google-search/#findComment-260754 Share on other sites More sharing options...
Wildbug Posted May 24, 2007 Share Posted May 24, 2007 Why not use file_get_contents() with a GET query and parse the contents? Or just put the <form> code on your page and let it load to Google's results? <form method="GET" action="google.php"> <input type=text size=40 name="GoogleQueryString"> <input type=submit></form> .......................................................................................... <?php $result = file_get_contents('http://www.google.com/search?q=' . urlencode($_GET['GoogleQueryString'])); // ... some parsing code echo $parsed_results; ?> ......................or............................. <form action="http://www.google.com/search" name=f> <input name=hl type=hidden value=en> <input maxlength=2048 name=q size=55 title="Google Search" value=""><br> <input name=btnG type=submit value="Google Search"><input name=btnI type=submit value="I'm Feeling Lucky"> </form> Quote Link to comment https://forums.phpfreaks.com/topic/52815-doing-an-outside-google-search/#findComment-260886 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.