Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    is there an HTML code to block 1 specific IP?

    Hi,
    I have a personal family website that is constantly hit by a "stalker" like woman that has been harrassing me via the net for over 2 years now. I would just like to block only her IP form viewing my site. I only know VERY BASIC stuff about websites (I use coolpages to make my site and sometimes edit with frontpage) and it's hosted by doteasy (which on my package doesn't offer htaccess files).

    I guess i'm just looking for or wondering if there is a general or basic HTML code that i can put in the head of my pages to deny access to this one IP. I do understand that it would be basic and she maybe able to find away around it, but at this point i just want to try and see if she'll go away!

    Any ideas where i can get such a code if there is one?
    THanks so much
    Cybermom

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Edinburgh, UK
    Posts
    402
    Thanks
    2
    Thanked 1 Time in 1 Post
    Well unless her IP is static there's not much you can do about it. If it is static and you know it is, then you really need to have a look in the JavaScript board, as pure HTML will be unable to do it alone. This link may help, however it's easy enought to get around http://www.javascriptkit.com/script/.../blockip.shtml. You should consider using a server-side language as this is more secure

    Hope this helps
    Rich

    "An expert is a person who has made all the mistakes that can be made in a very narrow field."

  • #3
    Senior Coder chilipie's Avatar
    Join Date
    Jul 2004
    Location
    Shrewsbury, UK Age: 16
    Posts
    1,117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Couldn't you try and contact her ISP to see if they can do something about it?

  • #4
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    She's with AOL and i've tried for the past 2 years to get them to do something to no avail...they seem to want to protect their clients rather then the victims of their clients actions...ugh!

    Thanks!
    Cyber Mom

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    lol had a problem similar to urs before, i got this persons ip addy, tracked them down to the address they lived on then found the house they lived at, called the police had a detective sent out to this persons house the same day, needless to say the harassment stopped

  • #6
    WA
    WA is offline
    Administrator
    Join Date
    Mar 2002
    Posts
    2,596
    Thanks
    2
    Thanked 19 Times in 18 Posts
    I'm moving this to Other Server side issues, as blocking IP is best done on the server end. With that in mind, if your server supports .htaccess (just ask your web host), simply add the below code inside one and upload the file to your root web directory:

    Code:
    order allow,deny
    deny from 24.35.22.23
    allow from all
    This should block 24.35.22.23 from your web site. The surfer will see a Permission denied error. For more info on .htaccess, see: http://www.javascriptkit.com/howto/htaccess.shtml
    - George
    - JavaScript Kit- JavaScript tutorials and 400+ scripts!
    - JavaScript Reference- JavaScript reference you can relate to.

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Location
    Edinburgh, UK
    Posts
    402
    Thanks
    2
    Thanked 1 Time in 1 Post
    Quote Originally Posted by WA
    I'm moving this to Other Server side issues, as blocking IP is best done on the server end. With that in mind, if your server supports .htaccess (just ask your web host)
    WA, Cyber Mom said in the original post that the server doesn't support htaccess:

    Quote Originally Posted by Cyber Mom
    it's hosted by doteasy (which on my package doesn't offer htaccess files).
    However it is best done in a server side script, as she will be unable to 'switch-off' the blocking system.

    Cyber Mom, does your server offer any server side languages, such as PHP, ASP, etc? If not then you will have to use javascript or another client side language (are there any others?? ).
    Rich

    "An expert is a person who has made all the mistakes that can be made in a very narrow field."

  • #8
    WA
    WA is offline
    Administrator
    Join Date
    Mar 2002
    Posts
    2,596
    Thanks
    2
    Thanked 19 Times in 18 Posts
    Ah you're right Badman3k, overlooked that part. cybermom, if this is a serious issue, perhaps you should firsr move your site to a hosting package that supports features like .htaccess. JavaScript really isn't suitable for things like IP blocking, since even if it works, you literally have to put the code on every page on your site. And it doesn't really work, since the viewer can always disable JavaScript on his/ her browser, and view the site regardless.
    - George
    - JavaScript Kit- JavaScript tutorials and 400+ scripts!
    - JavaScript Reference- JavaScript reference you can relate to.

  • #9
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    Quote Originally Posted by WA
    And it doesn't really work, since the viewer can always disable JavaScript on his/ her browser, and view the site regardless.
    If someone is stalking over the web the chances are that they'll know howto disable Javascript...

  • #10
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Quote Originally Posted by _Aerospace_Eng_
    lol had a problem similar to urs before, i got this persons ip addy, tracked them down to the address they lived on then found the house they lived at, called the police had a detective sent out to this persons house the same day, needless to say the harassment stopped
    I doubt that is an option, especially these days thanks to the RIAA. You need a court order to get an ISP to give up the owner of an IP at a specific date and time. And that takes a fair ammount of money and time.
    OracleGuy

  • #11
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    Quote Originally Posted by Error 404
    If someone is stalking over the web the chances are that they'll know howto disable Javascript...
    Quote Originally Posted by cybermom
    She's with AOL

    That'll be a "no", then

  • #12
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i thought AOL dynamically assigned a new IP to each pagerequest. So it's normally not gonna be a static IP then ...

    But i don't realy see the picture here: in what way is she harassing you? spamming your messageboard? sending you spam from a contactpage/link?
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #13
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    lol who said anything about me going through an ISP? just a simple conversation on instant messenger and that was it able to get the ip, then i got down to latitude and longitude and worked from there, hmm and about the .htaccess thing i may look into what few have said, about blocking ip from .htaccess


  •  

    Posting Permissions

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