['header' => "User-Agent: Mozilla/4.0"] ]); $html = file_get_contents($search_url, false, $context); // Basic parsing preg_match_all('/(.*?)<\/a>/is', $html, $matches); preg_match_all('//is', $html, $images); echo 'Results'; echo '

Results for: ' . htmlspecialchars($_GET['q']) . '

'; echo ''; for ($i = 0; $i < count($matches[1]); $i++) { echo ''; } echo '
'; echo '' . strip_tags($matches[2][$i]) . ''; echo '
'; echo '

Images

'; echo ''; foreach ($images[1] as $src) { echo ''; } echo '
'; echo ''; ?>