Jump to content

help using wildcards to perform multipole tasks


darkcarnival

Recommended Posts

hi,

I wish to better improve my banning system on my member script by being able to ban a wildcard of items.

like for example i would like to ban anyone who enters a hotmail account or some other free free mail account.

i also would like to do this for IP's too.

though I dont know how to do a wildcard check like this.

any help on this would be welcomed.

thanks :)
Link to comment
Share on other sites

use a regualr expression.

so if the users submits a hotmail account in the registration form...

if (preg_match('/hotmail/',$_POST['mail'])) {
...do stuff to stop registration...
}

you can also have...

$stop = '/hotmail|';
$stop .= 'yahoo|';
$stop .= 'gmail/';

if (preg_match($stop,$_POST['mail'])) {
...do stuff to stop registration...
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.