www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Server-Side Development > PHP

    PHP Discussion and technical support for using and deploying PHP based websites.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 10-28-2006, 03:23 PM
    HellgY HellgY is offline
    Registered User
     
    Join Date: Jan 2006
    Location: Israel
    Posts: 178
    Looking for bokeh's script to validate an E-mail address

    I had it once, and i searched all over the forums and my mail box for it.
    And i couldn't find it.

    I will be very glad to have it if bokeh still publishes it under free licence

    Thanks to all helpers!
    Reply With Quote
      #2  
    Old 10-28-2006, 04:58 PM
    so_is_this so_is_this is offline
    don't ask
     
    Join Date: Oct 2006
    Posts: 1,304
    A script isn't so much needed. Just a good Regular Expression will do it. I found this one from Felgal (a member on this site):
    PHP Code:
    '/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*\.(\w{2}|(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum))$/i'
    Reply With Quote
      #3  
    Old 10-28-2006, 05:18 PM
    chazzy's Avatar
    chazzy chazzy is offline
    Working class hero
     
    Join Date: Aug 2005
    Location: The Garden State
    Posts: 5,635
    Quote:
    Originally Posted by so_is_this
    A script isn't so much needed. Just a good Regular Expression will do it. I found this one from Felgal (a member on this site):
    PHP Code:
    '/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*\.(\w{2}|(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum))$/i'

    that only checks to see if it's actually formatted properly.

    bokeh has a script that can check to see that it's formatted correctly AND that the receiving server can actually verify that the account exists.

    the tool itself can be found here

    http://bokehman.com/validate_email

    but! you have to ask bokeh for the source code, i believe.
    __________________
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time
    Reply With Quote
      #4  
    Old 10-28-2006, 05:47 PM
    HellgY HellgY is offline
    Registered User
     
    Join Date: Jan 2006
    Location: Israel
    Posts: 178
    He send me he's own version of the getmxrr() function and finally, i found it
    could that be it?

    It might be because the manual says the principle of it's function is returning the mail exchangers from the DNS server

    If bokeh gives his permission i shall post the source in this thread
    Reply With Quote
      #5  
    Old 10-28-2006, 06:14 PM
    bokeh's Avatar
    bokeh bokeh is offline
    Keep it simple, stupid!
     
    Join Date: Jan 2005
    Location: Alicante (Spain)
    Posts: 7,708
    That script doesn't prove anything conclusive. If you want to verify an email address send it an email and wait for a response.
    Reply With Quote
      #6  
    Old 10-28-2006, 06:36 PM
    HellgY HellgY is offline
    Registered User
     
    Join Date: Jan 2006
    Location: Israel
    Posts: 178
    Quote:
    Originally Posted by bokeh
    That script doesn't prove anything conclusive. If you want to verify an email address send it an email and wait for a response.
    I'm not looking to prove anything, I'm looking to deprive a wrong email address, to the best my understanding, if mail exchange DNS records don't exist, then address can't be correct.

    But if they don't, it just might be.
    Reply With Quote
      #7  
    Old 10-28-2006, 07:00 PM
    bokeh's Avatar
    bokeh bokeh is offline
    Keep it simple, stupid!
     
    Join Date: Jan 2005
    Location: Alicante (Spain)
    Posts: 7,708
    Quote:
    Originally Posted by HellgY
    to the best my understanding, if mail exchange DNS records don't exist, then address can't be correct.

    But if they don't, it just might be.
    An email address can still be valid even if the is no MX record exists in the DNS. RFC 2821
    Reply With Quote
      #8  
    Old 10-28-2006, 07:06 PM
    HellgY HellgY is offline
    Registered User
     
    Join Date: Jan 2006
    Location: Israel
    Posts: 178
    How do you check mail addresses before sending any letters then?.
    Reply With Quote
      #9  
    Old 10-28-2006, 08:03 PM
    so_is_this so_is_this is offline
    don't ask
     
    Join Date: Oct 2006
    Posts: 1,304
    Quote:
    Originally Posted by chazzy
    that only checks to see if it's actually formatted properly.

    bokeh has a script that can check to see that it's formatted correctly AND that the receiving server can actually verify that the account exists.
    Oh, sorry, I thought it was only validation of format that was asked for. Ignore me.
    Reply With Quote
      #10  
    Old 10-29-2006, 02:25 AM
    Reli4nt's Avatar
    Reli4nt Reli4nt is offline
    King Prawn
     
    Join Date: Aug 2004
    Location: New York
    Posts: 324
    Quote:
    Originally Posted by HellgY
    How do you check mail addresses before sending any letters then?.
    Send a confirmation email when they sign up that they need to respond to.
    __________________
    The JPProject Multimedia
    Reply With Quote
      #11  
    Old 10-29-2006, 07:24 AM
    HellgY HellgY is offline
    Registered User
     
    Join Date: Jan 2006
    Location: Israel
    Posts: 178
    Quote:
    Originally Posted by Reli4nt
    Send a confirmation email when they sign up that they need to respond to.
    I'm doing that already, i just don't want to go through the bother of sending verification mail to a mail address that doesn't exist.
    Reply With Quote
      #12  
    Old 10-29-2006, 08:22 AM
    bokeh's Avatar
    bokeh bokeh is offline
    Keep it simple, stupid!
     
    Join Date: Jan 2005
    Location: Alicante (Spain)
    Posts: 7,708
    Quote:
    Originally Posted by HellgY
    I'm doing that already, i just don't want to go through the bother of sending verification mail to a mail address that doesn't exist.
    I don't see it as any more bother. In fact if you are going to send an email anyway I see the realtime validation as an unnecessary step. The only time it is really of use is when you specifically did not wish to send an email.
    Reply With Quote
      #13  
    Old 10-29-2006, 09:24 AM
    netbuddy netbuddy is offline
    Net Bum
     
    Join Date: Feb 2006
    Location: Where I live, people get shot. I need to move.
    Posts: 638
    Quote:
    Originally Posted by HellgY
    How do you check mail addresses before sending any letters then?.
    Use AJAX.
    __________________
    If life gives you a hard knock once in a while, your lucky. All I keep getting is a savage beating... everyday!
    AJAX! - Javascript Sha1 & MD5 - ASCII tables - Zend DevZone - My Space
    Stop Badware - Create "TEXT FILE" in Javascript - . - wikipedia on PHP -
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 02:40 PM.



    Acceptable Use Policy


    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.