[PHP] email_valid function not working??

2001-05-09 Thread Ben Rigby

hi. thanks in advance for any help!
i'm trying to make the email_valid function that i found on php.net
work.
i can get it to validate the email formatting, but it always fails on
the MX check and the DNS check.
any ideas??? thanks! please cc [EMAIL PROTECTED] with any answers

 function valid_email ($email) {
  if
(eregi("^[0-9a-z_]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$",
$email,$check)) {
   echo "passed formatting test. ";
   if ( getmxrr(substr(strstr($check[0], '@'), 1), $validate_email_temp)
) {
echo "passed getmxrr test. ";
 return TRUE;
}
// THIS WILL CATCH DNSs THAT ARE NOT MX.
if(checkdnsrr(substr(strstr($check[0], '@'), 1),"ANY")){
echo "passed dns check";
return TRUE;
}
  }
echo "FALSE";
return FALSE;
}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mail() function 30minute delay??

2001-07-11 Thread Ben Rigby

hi.
i'm using the mail() function to send email from a PHP script on a UNIX
system. sample code is:

$result=mail ($mail_to, $mail_subject, $mail_body, $mail_headers);

and it seems to be placing the mail in the sendmail queue which gets
sent every 30 mintues. is there a PHP mail() option or another mailing
command that can speed up this time?

or, does this sound like a sendmail setting?

thanks for any help!
ben




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] problems sorting an associative array...

2001-08-13 Thread Ben Rigby

hi.
any help would be mych appreciated!
i'm trying to sort an associative array, but when i do, the key is
converted into a number (it should be a string). ie:

$email_array["[EMAIL PROTECTED]"]=1;
$email_array["[EMAIL PROTECTED]"]=4;
$email_array["[EMAIL PROTECTED]"]=10;
rsort ($email_array);

i'm trying to sort by the value and then echo out the key and value
together, but when i do, the key is always a number, rather than the
email address that i wanted. any ideas??

thanks,
ben


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] figured it out!

2001-08-13 Thread Ben Rigby

figured it out.
i had to use:
array_multisort ($email_array,SORT_DESC);
thanks,
ben

Ben Rigby wrote:

> hi.
> any help would be mych appreciated!
> i'm trying to sort an associative array, but when i do, the key is
> converted into a number (it should be a string). ie:
>
> $email_array["[EMAIL PROTECTED]"]=1;
> $email_array["[EMAIL PROTECTED]"]=4;
> $email_array["[EMAIL PROTECTED]"]=10;
> rsort ($email_array);
>
> i'm trying to sort by the value and then echo out the key and value
> together, but when i do, the key is always a number, rather than the
> email address that i wanted. any ideas??
>
> thanks,
> ben


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]