Help! I am trying to get results from google and live search to display their results on a page on my server. If a user searches then the results from both those sites will be displayed - theoretically. Here is my code so far: - i just don't know how to parse results.. please help. <?php $links = array("http://www.google.co.uk/search?q={QUERY}", "http://search.live.com/results.aspx?q={QUERY}"); $query = $_POST['query']; // Contains the value of what you want to search for foreach($links as $url) { $url = str_replace("{QUERY }", $query, $url); $content = file_get_contents($url); echo "Results!" . "$content\n\n"; } ?> PHP: Sam.
That'll be a waste of time. You will have to regexp your way through the source, which they change regularly to stop scrapers like you. That way you get to rewrite your script every couple of days. For Live you can use their RSS feeds instead. Google has a dying API you may want to consider.
i just want to display googles results - im sure that is possible - what about this site? www.dogpile.com they do it
They have an agreement of source with technical backup of such a deal. They certainly aren't scraping the content, wasting all that bandwidth.
Search google ok here you go : without API : http://forums.digitalpoint.com/showthread.php?t=39090 With API : http://forums.digitalpoint.com/showpost.php?p=3031840&postcount=10