ereg and eregi functions will be deleted from Php. Please help to find alternatives for the following ereg functions:
1) To allow IP addresses only for specific ranges:
$targetAddr = "60.37..*..*";
if (!ereg($targetAddr, $_SERVER['REMOTE_ADDR'])) {
die;
}
2) To replace series of points like .......................
$message = ereg_replace("[.]{3,}", "... ", $message);