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 :)
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...
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.