Unifix knowledge database - The original one

Dashboard - News - Search - List - About - Admin


special front page from certain IP's in php

Author:black - Tue Mar 2 13:58:12 2004

This is trivial I know, but I needed to store the code as I don't use it anymore...

$page                   = $_REQUEST['page'];
if ($page == '') {
/*
        kode for at sætte specifik forside for specifikke IP'er
*/
        $this_ip = split("\.", $_SERVER["REMOTE_ADDR"]);
        if (
                (
                        $this_ip[0] == "10" &&
                        $this_ip[1] == "2" &&
                        $this_ip[2] == "1" &&
                        (
                                (
                                        $this_ip[3] <= "70" &&
                                        $this_ip[3] >= "60"
                                ) ||
                                $this_ip[3] == "10"
                        )
                ) || (
                        $this_ip[0] == "212" &&
                        $this_ip[1] == "242" &&
                        $this_ip[2] == "248" &&
                        $this_ip[3] == "84"
                )
        ) {
                $page = 'lan';
        } else {
                $page = 'main';
        }
}
Copyright(c) Unifix.org 2002-2011


Dashboard - News - Search - List - About - Admin
 
Powered by Mikjaer Consulting Solutions - Hosted by Specialhosting.dk