|
Until you sign up you can't do much. Yes, it's free.
|
|
|
|
|
|
|
 | / / / Viewing Topic
|  |
|
|
|
|
 LiveWire Humor
|
|
revived5656
Connoisseur
|
google it
------- "Cool Story bro, Can you write another?" "I like to hit to from the back." (No Homo)
|
|
|
|
|
BoXLunch
Professional
Patron
|
Quote: from jkjslkjind at 11:36 pm on Dec. 30, 2008
$handle = fopen('filename.txt','r'); $thisisthelist = fread($handle,9000); fclose($handle); $badip = explode($thisisthelist,"\n"); 
I would like to expand on this. | Code: | $handle = fopen('filename.txt','r'); $thisisthelist = fread($handle,9000); fclose($handle); $badip = explode($thisisthelist,"\n"); Could probably go as $handle = fopen('filename.txt','r'); $thisisthelist = fread($handle, filesize('filename.txt')); fclose($handle); $badip = explode($thisisthelist,"\n"); $banned = false; while (list ($key, $val) = each ($badip)) { if($val == $_SERVER['REMOTE_ADDR']) { $banned = true; } } if($banned) { #do bad stuff } | This actualy cycles trough the list, checks to see if the ip is there. Post edited at 4:16 pm on Mar. 28, 2009 by BoXLunch
------- Kill one man, and your a muderer. Kill a million, and your a king. kill them all, and you god. line for rent. 74 characters max.
|
4:14 pm on Mar. 28, 2009 | Joined: Mar. 2009 | Days Active: 49 Join to learn more about BoXLunch Montana, United States | Lesbian Male | Posts: 2,501 | Points: 2,713
|
|
| |
|
|
|
| Looking for something else?
|
|
|
|
|
|
 | / / / Viewing Topic |  |
|