I'm using CcMail newsletter in my website and the logs of apache are full of
PHP Deprecated: Function eregi() is deprecated
I did a search in the code and i have found the function in a couple of places.
The first one is like below to check if the three variables are numeric with values 0-9,
Any suggestion of how can i replace this?
- Code: Select all
eregi("^[0-9]+$", $applied_settings['max_displayed_recipients'])
Also in another file it checks if the email address is valid,
any suggestion on that?
- Code: Select all
function validate_email($email)
{
$regexp = "^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$";
if (eregi($regexp, $email)) return true;
else return false;
}
and the third place i have found the code is
- Code: Select all
eregi("\.ccmail$", $file)
and i don't understand what it does, does it have to do with the extension of the file?
Thank you for your time
Alex



