consider using fopen to open the search page with the query i.e.
$myFile = fopen("http://www.domain.com/search.php?query=keyword", "r");
then use fread() to read the file into a variable. You can then use strpos() to find the first occurence of the keyword in the returned results. hope this helps.