View Single Post
Old 03-30-2012, 10:22 AM  
cooldude7
Confirmed User
 
cooldude7's Avatar
 
Industry Role:
Join Date: Nov 2009
Location: Heaven
Posts: 4,306
Quote:
Originally Posted by Darrell View Post
How do you add a dynamic warning page that will detect the ip and display a different warning page/language for different countries?
PHP Code:
<head>
<
script src="http://www.geoplugin.net/javascript.gp" type="text/javascript"></script>
<script type="text/javascript">
    switch(geoplugin_countryCode()){
        case "AT" :
            document.location.href = "http://austriatraffic";
            break;
        case "CH" :
            document.location.href = "http://switzerlandtraffic"
            break;
        case "DE" :
            document.location.href = "http://germantraffic"
            break;
        default :
            document.location.href = "http://othertraffic"
            break;
    }
</script>
</head> 
cooldude7 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote