phpbar.de logo

Mailinglisten-Archive

[php] RE: problem with validateEmail

[php] RE: problem with validateEmail

Boaz Yahav berber_(at)_netvision.net.il
Sun, 11 Jul 1999 16:37:17 +0200


Hi

I'm having problems using the script right now cause the server i'm
developing on uses PHP4/Zend and it seems there is a bug
which needs to be solved first.

As soon as zeev takes care of the bug i will try to look at this.

berber
 

 



-----Original Message-----
From: Werner Stuerenburg [mailto:ws_(at)_art-quarter.com]
Sent: Sunday, July 11, 1999 3:12 PM
To: php3_(at)_lists.php.net
Cc: php_(at)_solix.wiso.Uni-Koeln.DE; jon_(at)_clearink.com; shane_(at)_tuna.org;
berber_(at)_berber.co.il
Subject: problem with validateEmail


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