jmc67
12-14-2003, 12:12 AM
Although this isn't directed at hosting persay, I thought I'd ask anyway. If this is inapropriate, then the mods know what to do.
I have a script that sends ringtones, images, screensaver and games to pcs-vision phones. Now the script at this time only allows 10 digit numbers and email addresses to @sprintpcs.com only. What I would like to do and can't seem to do is to also allow @messaging.sprintpcs.com to be used as well. Any other email is not allowed. Below is a partial code. Any clue on how I can also add messaging.sprintpcs.com to this?
$GLOBALS['Email Match'] = '/@sprintpcs\\.com/i';
$GLOBALS['Email Match Message'] = 'You can only email addresses at ' .
'sprintpcs.com with this uploader.';
// Treat as email address. Remove stuff that could be bad. Be strict.
$sendto = preg_replace('/[^@a-zA-Z0-9\.\-_]/', '', $sendto);
$type = 'email address';
if (! preg_match('/[^@]+@[^@]+/', $sendto))
Bail("The email address \"$sendto\" is invalid.");
if (isset($GLOBALS['Email Match']) &&
! preg_match($GLOBALS['Email Match'], $sendto))
Bail($GLOBALS['Email Match Message']);
I have a script that sends ringtones, images, screensaver and games to pcs-vision phones. Now the script at this time only allows 10 digit numbers and email addresses to @sprintpcs.com only. What I would like to do and can't seem to do is to also allow @messaging.sprintpcs.com to be used as well. Any other email is not allowed. Below is a partial code. Any clue on how I can also add messaging.sprintpcs.com to this?
$GLOBALS['Email Match'] = '/@sprintpcs\\.com/i';
$GLOBALS['Email Match Message'] = 'You can only email addresses at ' .
'sprintpcs.com with this uploader.';
// Treat as email address. Remove stuff that could be bad. Be strict.
$sendto = preg_replace('/[^@a-zA-Z0-9\.\-_]/', '', $sendto);
$type = 'email address';
if (! preg_match('/[^@]+@[^@]+/', $sendto))
Bail("The email address \"$sendto\" is invalid.");
if (isset($GLOBALS['Email Match']) &&
! preg_match($GLOBALS['Email Match'], $sendto))
Bail($GLOBALS['Email Match Message']);
