How can i create a php script that will search websites for articles that the contains are string?

<?php
    $search = $_GET['input'];

    echo "<a href=\"http://www.google.com/search?q=$search\" target=\"blank\">Results</a>";
?>

and then when you call the page, go like this: www.blahblah.com/index.php?input=php script to search all of the interwebs