<%! String userIP = null; %> <%-- Test if ip begins with 136.206 (DCU) or 127.0.0.1 (localhost) --%> <% userIP = request.getRemoteAddr(); if ((userIP.substring(0,6).equals("136.206")) ||(userIP.equals("127.0.0.1"))) { %>

ACCESS GRANTED

User is accessing page at DCU or locally!

The secret password is: spk.ll <% } else { // The client is not at DCU or on the local machine out.println("

ACCESS DENIED

"); out.println("Illegal access from an external machine with IP Address: " + userIP); // Email an administrator, make a log or whatever..... } %>