hello, i sudddenly started recieveing this error on my website rea*rest.com a few days back. its a youtube video download script. PHP. Warning: ereg() [function.ereg]: REG_EMPTY in /mounted-storage/home86c/sub004/sc47367-PVGT/rea*rest.com/php/getURL.php on line 10 Some correction here, line 10: if (ereg($matches[1], $_GET['url'])) can anybody help regarding this? i checked the file and stuff seems fine.
one of the variables are empty, if you dont want any noice about it, change it too: if (@ereg($matches[1], $_GET['url']))
<?php if (isset($_GET{'url'})){ $url=$_GET{'url'}; $url=trim($url); if (strstr($_GET['url'],"youtube.com")){ $data = @file_get_contents($_GET['url']); @preg_match('#/watch_fullscreen\?video_id=([a-z0-9-_]+)&l=([0-9]+)&t=([a-z0-9-_]+)#i', $data, $matches); if (@ereg($matches[1], $_GET['url'])) { Header("Location: http://www.youtube.com/get_video?video_id=$matches[1]&l=$matches[2]&t=$matches[3]"); } } ?>