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 8 of 8
  1. #1
    New Coder
    Join Date
    Jan 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Resrict access to site

    Im trying to find a way to stop repeat views of my site, strange I know.

    Ive tried a timed ip block but couldnt get that to work so im thinking cookie based.

    Ive no idea how to do this so if anyone has any ideas or code I would be grateful.

    I have an ex employee that keeps hitting my site but hes using a ip switcher so I cant keep up with blocking him manually, 3000 hits in one day.

    I want to allow access to site then when the visitor leaves they wont be allowed back to view again for 36 hours.

    Any ideas?

  • #2
    Regular Coder
    Join Date
    Apr 2004
    Posts
    298
    Thanks
    0
    Thanked 23 Times in 23 Posts
    What about potential real customers, who visit in the morning, go to lunch and want to visit again same day?

  • #3
    New Coder
    Join Date
    Jan 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The site I have will only refresh every 36 hours, its for voting on photos from local car club but rival club is messing with votes.

  • #4
    Regular Coder Microsuck's Avatar
    Join Date
    Oct 2011
    Location
    127.0.0.1
    Posts
    123
    Thanks
    44
    Thanked 5 Times in 5 Posts
    You can use the setcookie() function.
    PHP Code:
    <?php echo "Microsuck says hi!"?>

  • #5
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,091
    Thanks
    51
    Thanked 506 Times in 493 Posts
    Quote Originally Posted by Microsuck View Post
    You can use the setcookie() function.
    Sure, if the attacker is using one machine that might work but if they're using several machines (which I suspect) then thats absolutely useless (along with my suggestion for looking into the e-tag!).

    The only thing you can do here is to implement a anti-spam mechanism like a captcha. No-one will sit there manually entering one captcha after another just to wind you up. There is one on tinypic.com that is flashbased which seems rather good and I don't think its their own (IE I think its one that you can sign up to use). You might want to look into that.
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!

  • #6
    New Coder
    Join Date
    Jan 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Believe it or not the guy who is is doing this has done that before, he sat there and filled out my captcha forms 126 times, sad sad man.

    I have a timed ip block script which i posted on here a while ago but just couldnt get it to work or i was putting it in the wrong place.

    I want to log ip address time and date in a text file,
    check visitor details when they arrive,
    if on file block for 36 hours,
    if not on file let into site and log ip/time/date
    when they leave and try to return they then go to check log again

    Does that make sense?

  • #7
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,091
    Thanks
    51
    Thanked 506 Times in 493 Posts
    Quote Originally Posted by delaw View Post
    Believe it or not the guy who is is doing this has done that before, he sat there and filled out my captcha forms 126 times, sad sad man.
    So he got bored eventually then

    There isn't really a 100% fool proof way of stopping someone from doing this except to make it time consuming. That way they'll get bored or run out of time.

    You could always put into place email validation.. that'll slow him down even more.
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!

  • #8
    Regular Coder
    Join Date
    Apr 2009
    Location
    Earth - sometimes sky :-)
    Posts
    121
    Thanks
    51
    Thanked 2 Times in 2 Posts
    Ok,
    it's seems to me like someone try to flood your site with connection...
    Is there in the cPanel no option to block the IP address of the attacker?

    Or maybe you write a function like IP_filter and put it on the top of your page.
    The IP_filter should collect IP address from the visitors and the visiting date with the visiting time and start to count the time and stop the visitor to load the page if xx time is not reached.
    Until the time is counting for the visitor they will be redirected to an error page let's say...

    So, in a real short time you will get a nice database with IP's of the visitors and this should work...

    Or you maybe try to see what options ur have to attack a site... ;-)
    Is this your really question...


  •  

    Posting Permissions

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