This is an old revision of the document!
if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet
{
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy
{
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
$ip=$_SERVER['REMOTE_ADDR'];
}
$ip = $_SERVER['REMOTE_ADDR'];
// Try the following line if the ip is blank after this
// $ip=@$REMOTE_ADDR;
$regs = array();
// Enter suitable ip addr pattern below. The following code block executes only if
// the ip addr starts with 10.12
if(!ereg("(^10.105.1.3$)",$ip,$regs))
{
echo "<center><font size =2><b>INTERNAL LINKS</b></font></center>";
echo "<hr>";
// Create a html file with the desired internal links.
// Here I assume that it is called internal_links.html
//echo "<iframe frameborder=0 src='internalLink.html'></iframe>";
echo "<ul><LI><A href='http://trellis.cse.iitb.ac.in/~archive/'>Lab Work Archive</A></LI>";
echo "<LI><A href='http://trellis.cse.iitb.ac.in/graphics/doku.php?id=lab_hours_and_occupancy_schedule'>Lab Hours and Weekly Schedule</A></LI>";
echo "<LI><A href='http://trellis.cse.iitb.ac.in/graphics/doku.php?id=equipment'>Equipment</A></LI>";
echo "<LI><A href='http://www.cse.iitb.ac.in/graphics/LoginCreationRequest.html'>Login Creation Request</A></LI>";
echo "<LI><A href='http://bhim.cse.iitb.ac.in/mailman/listinfo/vigil'>Mailing List Archive</A></LI>";
echo "<LI><A href='http://trellis.cse.iitb.ac.in/graphics/doku.php?id=wiki_faq'>Wiki FAQ</A></LI>";
echo "<LI><A href='http://trellis.cse.iitb.ac.in/graphics/doku.php?id=vigil:faq'>VIGIL FAQ</A></LI>";
echo "<LI><A href='http://trellis.cse.iitb.ac.in/graphics/doku.php?id=contact:useful-numbers'>Useful Numbers</A></LI></ul>";
}
// Use the following line for debugging the ip addr