Urgent: PHP Email Validation

  • sevster
  • Bronze Member
  • Bronze Member
  • User avatar
  • Posts: 518

Post 3+ Months Ago

What is the best way to validate an email address being submitted in a form?

I already have the javascript portion of it for syntactical purposes.

Now I need to know how I can validate the email actually exists or not. SMTP validation I assume, but from what I read, that's a very slow process.

Any suggestions?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • sevster
  • Bronze Member
  • Bronze Member
  • User avatar
  • Posts: 518

Post 3+ Months Ago

Quite urgent...any help please?
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2194
  • Loc: Canada

Post 3+ Months Ago

Why do you need to validate it exists?
Can't you simply preg_match to validate it's a real email address?
  • sevster
  • Bronze Member
  • Bronze Member
  • User avatar
  • Posts: 518

Post 3+ Months Ago

if you preg_match, all it does it validates the format, so a alsdjfalks12313212@yahoo.com would do just fine.

I'm getting random emails from random people with BS information on the forms...I need to stop that from happening.
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2194
  • Loc: Canada

Post 3+ Months Ago

What about a CAPTCHA?
  • sevster
  • Bronze Member
  • Bronze Member
  • User avatar
  • Posts: 518

Post 3+ Months Ago

Yeah, that might be the best way to go.

If there are any other suggestions, please let me know. Or else, I'll go with the Captcha idea.

Thanks
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2194
  • Loc: Canada

Post 3+ Months Ago

You could require them to reply to an email before the message is sent?
  • sevster
  • Bronze Member
  • Bronze Member
  • User avatar
  • Posts: 518

Post 3+ Months Ago

Can't do that because of the fact that the forms are for anonymous people, not required to join or be a member or anything like that.

Captcha is it I think.

Thanks again.
  • cjxxi
  • Expert
  • Expert
  • cjxxi
  • Posts: 565
  • Loc: Fort Worth, TX

Post 3+ Months Ago

yes , there is a way.....
  • cjxxi
  • Expert
  • Expert
  • cjxxi
  • Posts: 565
  • Loc: Fort Worth, TX

Post 3+ Months Ago

how ever there is no warranty that the email belongs to that person, so in other words it is impossible to ensure that email is really valid
  • sevster
  • Bronze Member
  • Bronze Member
  • User avatar
  • Posts: 518

Post 3+ Months Ago

So what is the way?
  • cjxxi
  • Expert
  • Expert
  • cjxxi
  • Posts: 565
  • Loc: Fort Worth, TX

Post 3+ Months Ago

man it took me so long come this script.. i am willing to sell it for 50 bucks. if you want it. By paypal.
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2194
  • Loc: Canada

Post 3+ Months Ago

lol
That doesn't sound very community friendly :P
  • cjxxi
  • Expert
  • Expert
  • cjxxi
  • Posts: 565
  • Loc: Fort Worth, TX

Post 3+ Months Ago

neksus wrote:
lol
That doesn't sound very community friendly :P


I know. but the commutity is one... and the budget is another.. meaning where ever you are you still eay, and pay for stuff.. so many hours of work are more than worth it. so do I. I apologizy if you miss understand the concept.
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2194
  • Loc: Canada

Post 3+ Months Ago

I understand the concept, but I can't see how something this simple can be thousands of lines of code. Granted some of the most powerful lines are only 2-300 characters...
Check this page out...
It utilizes the
Code: [ Select ]
getmxrr()
command, which verifies whether the domain has the ability to send and receive mail. The php.net resource says it shouldn't be used, but it presents a loophole for its logic.

That was found on the first page of "possible to validate an email exists in php?".
  • sevster
  • Bronze Member
  • Bronze Member
  • User avatar
  • Posts: 518

Post 3+ Months Ago

Nice, thanks neksus.

By the way, I never wanted your code, just the idea behind how it woudl be done. I can code it myself.
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2194
  • Loc: Canada

Post 3+ Months Ago

How did that page turn out? Anything come to fruition because of it?
  • cjxxi
  • Expert
  • Expert
  • cjxxi
  • Posts: 565
  • Loc: Fort Worth, TX

Post 3+ Months Ago

i am glad it worked out.
  • sevster
  • Bronze Member
  • Bronze Member
  • User avatar
  • Posts: 518

Post 3+ Months Ago

I actuall had to write it in ASP not PHP, so I used base validation and DNS validation...

followed here
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2194
  • Loc: Canada

Post 3+ Months Ago

Ah fair enough. Whatever works :)

Post Information

  • Total Posts in this topic: 20 posts
  • Users browsing this forum: No registered users and 58 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.