Personally, I probably wouldn't even bother with cURL. Suppose you have a form field called "search" that supplies the search string:
$search = urlencode($_POST['search']);
$results = file_get_contents("http://www.google.com/search?q=$search");
At this point, you will need to do some tests to see what the returned text looks like, determine how the data that is of interest to you is marked up so that it can be identified, then probably use some of the preg_*() functions to get/filter the desired data.