Re: Network functions problem

From: Date: Tue, 17 Oct 2000 18:47:04 +0000
Subject: Re: Network functions problem
References: 1 2 3  Groups: php.windows 
Request: Send a blank email to php-windows+get-3307@lists.php.net to get a copy of this message
OK ... I now know that checkdnsrr() and getmxrr() does not work at all for windows platform.. Are there any alternative ways to check for valid email addresses on windows? I mean real check and not only syntax. Here is the email validator I was trying (does't work on windows) ---------------------------------------------------------------------------- ------------------ function checkEmail($email, $check_dns = false) { if( (preg_match('/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/', $email)) || (preg_match('/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/', $email)) ) { if($check_dns) { $host = explode('@', $email); // Check for MX record if( checkdnsrr($host[1], 'MX') ) return true; // Check for A record if( checkdnsrr($host[1], 'A') ) return true; // Check for CNAME record if( checkdnsrr($host[1], 'CNAME') ) return true; } else { return true; } } return false; } ---------------------------------------------------------------------------------------- S. ----- Original Message ----- From: Andy Hoffman <andy.hoffman@bms.com> To: php windows <php-windows@lists.php.net> Sent: Ôñßôç, 17 Ïêôùâñßïõ 2000 6:56 ìì Subject: Re: [PHP-WIN] Network functions problem > Papagelis Athanasios wrote: > > > hello to all, > > > > I'm using windows 2000 with php 4.0.3 and I have found an email validator > > for an e-commerce site we are preparing. (see below) > > > > The problem is that the checkdnsrr function doesn't work at all. Anyone > > knows why or any way around this problem ....??? > > Did some checking, and it appears that both the checkdnsrr() and the getmxrr() > functions are not working here either... I have feeling that this is due to some > missing PHP.INI setting re: where DNS lookups should go to check entries, but > not sure. Perhaps the DNS server needs to be specified somewhere??? > > Equally stumped as you are. Anyone else on the list try these functions? (user > comments are sparce/non-existent regarding these functions in the php.net > manual). > > -- > Andy Hoffman > Web Developer > Bristol-Myers Squibb > email: andy.hoffman@bms.com > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.windows (#3307) next »