Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
IP address
Results 1 to 2 of 2

Thread: IP address

  1. #1
    Newbie
    Join Date
    Mar 2005
    Posts
    1
    I found this script on the web... I was wondering if anyone knows how to add IP address to this script.

    When I try the comma approach ('44.44.44.44','44.445.55.55') it ends up blocking everything. It also doesn?t work if i do this:
    if (ip == "664.43434.13479.23429");
    if (ip == "664.4664.13479.23429");
    if (ip == "664.44354.13479.23429")

    Anywas that IP is fake just incase you dont know, I have a website in which some forms get spammed, and I know the IP address and want to be able to block them but I cant figure out how to add multiple IP's to this script.


    <script language="javascript">
    var ip = &#39;&#39;
    if (ip == "664.43434.13479.23429") {
    alert("Go away, your IP has been banned");
    {location.href="http://www.dfsdfsdf.com" } }
    </script>

  2. #2
    Newbie
    Join Date
    Aug 2005
    Posts
    1
    Originally posted by adamstang@Mar 26 2005, 01:06 AM
    if (ip == "664.43434.13479.23429");
    if (ip == "664.4664.13479.23429");
    if (ip == "664.44354.13479.23429")
    Instead of using semicolons, try using "or".

    if (ip == "664.43434.13479.23429") or
    if (ip == "664.4664.13479.23429") or
    if (ip == "664.44354.13479.23429")

    That&#39;s what you do in php, so it might work.

Similar Threads

  1. Bad ip address
    By saswata in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 08-27-2007, 05:26 AM
  2. Ip Address
    By saswata in forum Windows - General Topics
    Replies: 2
    Last Post: 07-07-2007, 07:48 PM
  3. How to Achive IP address through MAC(Ethernet) address
    By krishnacins in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 10-03-2005, 02:17 PM
  4. IP address??
    By in forum Windows - General Topics
    Replies: 24
    Last Post: 01-03-2004, 07:58 PM
  5. Lan address?
    By pinehead in forum Linux - General Topics
    Replies: 3
    Last Post: 07-24-2003, 06:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •