sith717
Members-
Posts
151 -
Joined
-
Last visited
Never
Everything posted by sith717
-
OOOOH!! LOL, I am sorry... didnt read it right... Like so people can send emails to each other or webmail type thing??
-
Like a messaging system for members of your site? Or like AjaxIM?
-
hu? I have no idea what you mean... Please pm me.
-
Understand what I mean?
-
Yes, how do I do it so I can add something to the table like a persons ip, like form that adds it to the database.
-
How do I do it so I can use a database to store the banned people.
-
I didnt use a db since I dont know how to do it.
-
Yes. I will be posting the code snippet. So everyone can use it.
-
Instead I made it a html page. Thanks anyways.
-
Thank you verrrrry much!! I have one more problem. I am making a textbox so people can select the code, how do I make it so the php code appears <textarea name="group_code" class="element textarea medium pre"> <?php $ips = array_map('trim', file('ban.txt')); if (in_array($_SERVER['REMOTE_ADDR'], $ips)) {exit('You have been banned!');} ?> </textarea>
-
The current permissions are 644 Is that correct?
-
errors: Notice: Undefined index: address in /home/bucketho/public_html/admin/newer/more/ban.php on line 6 Notice: Undefined index: address in /home/bucketho/public_html/admin/newer/more/ban.php on line 6 Notice: Undefined variable: mes in /home/bucketho/public_html/admin/newer/more/ban.php on line 9 Notice: Undefined index: address in /home/bucketho/public_html/admin/newer/more/ban.php on line 6 Notice: Undefined variable: mes in /home/bucketho/public_html/admin/newer/more/ban.php on line 9 Warning: fopen(ban.txt) [function.fopen]: failed to open stream: Permission denied in /home/bucketho/public_html/admin/newer/more/ban.php on line 13 Notice: Undefined index: address in /home/bucketho/public_html/admin/newer/more/ban.php on line 6 Notice: Undefined variable: mes in /home/bucketho/public_html/admin/newer/more/ban.php on line 9 Warning: fopen(ban.txt) [function.fopen]: failed to open stream: Permission denied in /home/bucketho/public_html/admin/newer/more/ban.php on line 13 Warning: fwrite(): supplied argument is not a valid stream resource in /home/bucketho/public_html/admin/newer/more/ban.php on line 14 Notice: Undefined index: address in /home/bucketho/public_html/admin/newer/more/ban.php on line 6 Notice: Undefined variable: mes in /home/bucketho/public_html/admin/newer/more/ban.php on line 9 Warning: fopen(ban.txt) [function.fopen]: failed to open stream: Permission denied in /home/bucketho/public_html/admin/newer/more/ban.php on line 13 Warning: fwrite(): supplied argument is not a valid stream resource in /home/bucketho/public_html/admin/newer/more/ban.php on line 14 Warning: fclose(): supplied argument is not a valid stream resource in /home/bucketho/public_html/admin/newer/more/ban.php on line 15 Notice: Undefined index: address in /home/bucketho/public_html/admin/newer/more/ban.php on line 6 Notice: Undefined variable: mes in /home/bucketho/public_html/admin/newer/more/ban.php on line 9 Warning: fopen(ban.txt) [function.fopen]: failed to open stream: Permission denied in /home/bucketho/public_html/admin/newer/more/ban.php on line 13 Warning: fwrite(): supplied argument is not a valid stream resource in /home/bucketho/public_html/admin/newer/more/ban.php on line 14 Warning: fclose(): supplied argument is not a valid stream resource in /home/bucketho/public_html/admin/newer/more/ban.php on line 15 Ip has been banned! Notice: Undefined index: address in /home/bucketho/public_html/admin/newer/more/ban.php on line 6 Notice: Undefined variable: mes in /home/bucketho/public_html/admin/newer/more/ban.php on line 9 Warning: fopen(ban.txt) [function.fopen]: failed to open stream: Permission denied in /home/bucketho/public_html/admin/newer/more/ban.php on line 13 Warning: fwrite(): supplied argument is not a valid stream resource in /home/bucketho/public_html/admin/newer/more/ban.php on line 14 Warning: fclose(): supplied argument is not a valid stream resource in /home/bucketho/public_html/admin/newer/more/ban.php on line 15 OMG!
-
Something is wrong.
-
If you want you can upload to a host and see. I am getting different errors every time. Thank you.
-
Ok, when I look at ban.php in firefox it shows errors. Does it for you?
-
What does that mean? Is there anything I should take out or add in?
-
Well, the form, is supposed to post the a ip into ban.txt then the ban.php is spposed to use the ips in ban.txt thats it.
-
Your posting something that does not have anything to do with my post?
-
This script I made is not working. Please tell me what is wrong. -- ban.php - page <?php //Id of input box $IP = Trim(stripslashes($_POST['address'])); //This it to log on the website $mes .= 'Ip'.$IP."\n<br>"; //Log to a file $file = "ban.txt"; $fh = fopen($file, "a"); fwrite ($fh, "$mes\n"); fclose($fh); ?> Ip has been banned! banip.php - page <center> <FORM action="ban.php" method="post"> <P> <LABEL for="firstname">Ip Address </LABEL> <br> <INPUT type="text" id="address"><BR> <INPUT type="submit" value="Send"> </P> </FORM> </center> banned.php - page <?php $filename = "ban.txt"; //Set File Name $error = "You have been banned!"; $ips = file($filename); //Load File into Array ips foreach ($ips as $banned_ip) { //Loop through Ips and check if they match yours $yourip = $_SERVER['REMOTE_ADDR']; // Store your ip into $yourip if ($yourip == $banned_ip){ echo "$error"; exit; } } ?> Text if your not banned
-
Its something simple. If someone can help me out and like get a snippit would be great.
-
I still have no help. Still waiting...
-
I have pmed you.
-
I will pm you with what I need. Thanks.