View Single Post
  #9 (permalink)  
Old 10-04-09, 10:03 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
Nico - good point about trim.

PHP Code:

$aBad=array('password','notnice','ugly', ...);  /* All lowercase */ 

/* Make username lowercase for comparison */ 
if (in_array(strtolower(trim($slc)),$aBad)) die('Bad username'); 
If you find you have a really long list, I'd store it in a text file and use grep, on the commandline. It's unlikey you'll ever need it.
Reply With Quote