Ereg/eregi functions will be deleted from PHP 6.0.
Please help to find alternatives for the following 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 .......................
[code=html]$message = ereg_replace("[.]{3,}", "... ", $message);
[/code]
3) This is from the popular "PHP Mailer" script:
if(eregi('^(.+):([0-9]+)$', $hosts[$index], $hostinfo)) {
$host = $hostinfo[1];
$port = $hostinfo[2];
} else {
$host = $hosts[$index];
$port = $this->Port;
}
Thank you very much.