phpbar.de logo

Mailinglisten-Archive

[php] problem with validateEmail

[php] problem with validateEmail

Werner Stuerenburg ws_(at)_art-quarter.com
Sun, 11 Jul 1999 15:12:17 +0200


Hello!

I just stumbled across a problem with validateEmail (By: Jon S.
Stevens jon_(at)_clearink.com, Shane Y. Gibson shane_(at)_tuna.org, berber
berber_(at)_berber.co.il).

My own address ws_(at)_art-quarter.com was classified invalid about every
fifth time, sometimes even every time.  I wondered what was
happening here.

First thing I discovered was a missing else bracket:

         $fp = fsockopen ( $mxhosts[$i], 25 );
          // if the 'fp' was set, then goto work
         if ($fp)
         {
	...
         }

no else!!!

Next I tested if I could force a fsockopen if it failed. 

count ( $mxhosts ) was always 1; even with 50 attempts there was no
result.  If the first fsockopen would fail, all subsequent 49
attempts would fail as well. Didn't make much sense to me to raise
the number of attempts. No other idea either.

To keep my machine sensible, I filled in a work around.  Maybe one
of you experts can provide a solution.  
Also, I had to provide for a "no email check" check box because
checking a valid email address could result in waiting forever. 
There seemed to be a problem especially with AOL accounts.  

Not a satisfying situation, really.  I implemented email checking to
avoid invalid email addresses.  Doesn't make much sense to urge
people to use it with the risk of experiencing problems.  

Maybe a solution could be to cancel checking after some timeout (I
would be grateful for a piece of code).

Thank you.

-- 
Mit freundlichem Gruss
Werner Stuerenburg

____________________________________________________________
ISIS Verlag - Uhlandstr. 8 - D-32120 Hiddenhausen -  Germany
Tel. 0(049)5224-9974-07, Fax-09, <mailto:ws_(at)_art-quarter.com>
 <http://pferdezeitung.com>    -   <http://art-quarter.com>


php::bar PHP Wiki   -   Listenarchive