The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to Limit when users can access a web page from certain times?

Discussion in 'General Discussion' started by ninoj, Oct 13, 2005.

  1. ninoj

    ninoj Registered

    Joined:
    Apr 21, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I wanted to limit when a client can view a certain webpage only during the hours of 12pm to 2pm. Is there any way I can achieve this by using cpanel? Can anyone llep me on this?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    There's no such feature in cPanel. You might be able to use some client side scripting like javascript or server side using a perl CGI or php script, but either are not within the scope of this forum.
     
  3. ninoj

    ninoj Registered

    Joined:
    Apr 21, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    IS it possible for me to run a cron job that limits access to the file for a certain time?
     
  4. nerdzoll

    nerdzoll Well-Known Member

    Joined:
    Oct 4, 2004
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    Hi,
    I guess you could run a script (via cron) at 12 along the lines of
    #!/bin/bash
    chmod -R *chmodvalue* /home/thisuser/public_html/*

    then at 2

    chmod -R *chmodvalue* /home/thisusr/public_html/*

    Hope that might help...
    also just to warn you... doing this.. can get messy.

    Cheers
    Nerdzoll
     
  5. pshepperd

    pshepperd Well-Known Member

    Joined:
    Feb 12, 2005
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    You can setup a cron job to simply stick an .htaccess file where you want to deny access Deny From All.

    You could also setup two httpd.conf files and simply have them swap out and auto restart apache.
     
Loading...

Share This Page