Jump to content

sith717

Members
  • Posts

    151
  • Joined

  • Last visited

    Never

Everything posted by sith717

  1. OOOOH!! LOL, I am sorry... didnt read it right... Like so people can send emails to each other or webmail type thing??
  2. Like a messaging system for members of your site? Or like AjaxIM?
  3. hu? I have no idea what you mean... Please pm me.
  4. 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.
  5. How do I do it so I can use a database to store the banned people.
  6. I didnt use a db since I dont know how to do it.
  7. Yes. I will be posting the code snippet. So everyone can use it.
  8. Instead I made it a html page. Thanks anyways.
  9. 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>
  10. The current permissions are 644 Is that correct?
  11. 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!
  12. If you want you can upload to a host and see. I am getting different errors every time. Thank you.
  13. Ok, when I look at ban.php in firefox it shows errors. Does it for you?
  14. What does that mean? Is there anything I should take out or add in?
  15. 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.
  16. Your posting something that does not have anything to do with my post?
  17. 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
  18. Its something simple. If someone can help me out and like get a snippit would be great.
  19. I still have no help. Still waiting...
  20. I will pm you with what I need. Thanks.
×
×
  • 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.