darkcarnival Posted March 6, 2006 Share Posted March 6, 2006 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 https://forums.phpfreaks.com/topic/4176-help-using-wildcards-to-perform-multipole-tasks/ Share on other sites More sharing options...
ToonMariner Posted March 6, 2006 Share Posted March 6, 2006 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 https://forums.phpfreaks.com/topic/4176-help-using-wildcards-to-perform-multipole-tasks/#findComment-14512 Share on other sites More sharing options...
darkcarnival Posted March 6, 2006 Author Share Posted March 6, 2006 would that method also work for ips? Link to comment https://forums.phpfreaks.com/topic/4176-help-using-wildcards-to-perform-multipole-tasks/#findComment-14524 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.