Forum Moderators: coopster
When users enter a string into an inputbox, I'd like that string to go two ways: one is to query our database, and google results will also be shown at the same time.
The only way I know (and apparently a silly way) is to use fopen(). For example,
$search_string = $_GET('searchstring')
$requesturl = "http://www.google.com/search?q=".$search_string;
Then use fopen() to scrap the page and trim out unnecessary layout.
I'm wondering if there's a better way to deal with it? I've briefly taken a look on Google AJAX Search. Is it possible to make a form processing that can combine google AJAX search and my local database together?
Any advice is appreciated.
If you need help with the AJAX part of things I suggest you take a look on over in the Javascript Forum [webmasterworld.com] here at WebmasterWorld.
I find this is very useful for processing the page results once obtained