Results 1 to 3 of 3

Thread: Put site offline for everybody but not test account...

  1. #1
    Join Date
    Oct 2012

    Put site offline for everybody but not test account...


    I'm faced wit a rather unusual situation...

    We developed a site on a small local network to give journalists acces to realtime information.
    We setup their laptops in the morning and startup Opera in kioskmode and direct them to the site. From then on we have no more acces to the press area.

    After that we setup our own programs wich export .XML files to the server wich is then displayed on all the screens.

    The system works fine for one thing:
    When we setup our software, we send testfiles to the servers to check if everything is working. Thes testfiles are also displayed on the other laptops with some confusion as a result.

    My question:
    Can I temporarily block the site for all users except one (my test account) and then deblock the info when everything has been tested (without the users having to reload the page)?

    If yes, how can I do this?

    Probably an uncommon thing to ask, but I would be really gratefull for any suggestions.

    Kind regards,

  2. #2
    Join Date
    Feb 2012
    Pensacola, FL
    I dont know what language or how your suthentication works, but in PHP I would do something like this:
    PHP Code:
    $_SESSION['username']) && $_SESSION['username'] == 'testaccount' && $disable == 1){
    //Show Site Content
    }elseif($disable == 1){
    <script type="text/javascript">
    window.onload = function(){
    Site unavailable.<br />
    Retry in 5 seconds.
    //normal actions

  3. #3
    Join Date
    Oct 2012
    Thanks for the reply...

    Your solution would require the page to reload every 5 seconds with the (unprofessional looking) reload flash as a result. Is there a way to avoid this?
    The page polls for information (.XML files) regularly and updates using AJAX for a better result. If possible I'd like to keep it like that...


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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