Possible Duplicate:
Converting ereg expressions to preg
<?php
$searchtag = "google";
$link = "http://images.google.com/images?hl=de&q=$searchtag&btnG=Bilder-Suche&gbv=1";
$code = file_get_contents($link,'r');
ereg("imgurl=http://www.[A-Za-z0-9-]*.[A-Za-z]*[^.]*.[A-Za-z]*", $code, $img);
ereg("http://(.*)", $img[0], $img_pic);
echo '<img src="'.$img_pic[0].'" width="70" height="70">'; ?>
And i get this error
Deprecated: Function ereg() is deprecated in C:\Program Files\EasyPHP-5.3.8.1\www\m\img.php on line 5
Deprecated: Function ereg() is deprecated in C:\Program Files\EasyPHP-5.3.8.1\www\m\img.php on line 6
preg_match() functions give this error
Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in C:\Program Files\EasyPHP-5.3.8.1\www\m\img.php on line 6
Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in C:\Program Files\EasyPHP-5.3.8.1\www\m\img.php on line 7