Use Gmail And Yahoo Email Only In Registration

Started on the old forum in May 2010 · view the original in the archive · old links redirect here

6 replies · 1,356 views · started 16 years ago · 1 min read

4 participants
l0rdrayven Developer · 83 posts #1

Guys does anyone knows the code on how to restrict my site registration and let the users to use only gmail and yahoo email accounts. I have the code in my core.php function validemail($mail) but it only detects if the users email is in form of a-z to 1-0.. Anybody who could help me ang give the code? thanks in advance, keep rocking.!

Not i rip persons off i will also do your arse !

l0rdrayven Developer · 83 posts #2

My site registration requires the user not to type their own password instead system generates it for them and send the password to the registered email. This feature is a good way to slow the multi-accounts problem in community site. But their are email services that was so eary to sign up with like yuurok and sometimes user user fast.ph or mail2.ph email add like in this way 6390918646464@fast.ph then after the registration the password will be sent to their mobile phone lol, coz fast.ph and mail2,ph is a mailtosms service. Thats why i will stick my registration to yahoo and gmail only or a code which i can block several email domains that i want to block.

Not i rip persons off i will also do your arse !

thanatos Senior · 261 posts #3

Im nt using pc ryt nw bt il gve u an idea. Hav u got d script of kindatwap or wapnetph? Luk 4 d codings of upload via url. Ders dz code dat explodes d filename of d url. By simply changing d explode function instead of exploding / explode @ to get d domain. Nw use

if($string!=="yahoo.com"){ use yahoo and gmail only}else if($string!=="gmail.com"){ use yahoo and gmail only}else{ return true }

note: corect me if i uses d if is not and else if not statement wrng. I sumhow 4got d ryt location of ! coz im jst using a phased out mobile phne lolz.

something else Fellow · 2,296 posts #4
if(substr_count($string,"yahoo")>0||substr_count($string,"gmail")>0)
jsyguy23 Developer · 134 posts #5

anyone have the code to stop ppl signing up with an email thats in use on the site plz

something else Fellow · 2,296 posts #7

something else wrote:

if(substr_count($string,"yahoo")>0||substr_count($string,"gmail")>0)

Thinking about it you may want to use an array rather than hard code lots of emails into your code eg:

$email = "foobar@ymail.con";
$list = array("gmail","google","yahoo","ymail");
$email = explode("@",$email);
$email = str_replace($list,"@",$email[1]);
if(substr_count($email,"@")>0){
//ok
}else{
//not ok
}

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close