Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REDIRECT MOBILE
- <script>
- if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
- window.location.href="bleh";
- }
- </script>
- <script> window.top.location="bleh";
- </script>
- REDIRECT COUNTRY
- <?php
- // ccr.php - country code redirect
- require_once('geoplugin.class.php');
- $geoplugin = new geoPlugin();
- $geoplugin->locate();
- $country_code = $geoplugin->countryCode;
- switch($country_code) {
- case 'US':
- header('Location: http://www.domain.com/links/usa.php');
- exit;
- case 'CA':
- header('Location: http://www.domain.com/links/canada.php');
- exit;
- case 'GB':
- header('Location: http://www.domain.com/links/greatbritain.php');
- exit;
- case 'IE':
- header('Location: http://www.domain.com/links/ireland.php');
- exit;
- case 'AU':
- header('Location: http://www.domain.com/links/australia.php');
- exit;
- case 'NZ':
- header('Location: http://www.domain.com/links/newzealand.php');
- exit;
- default: // exceptions
- header('Location: http://www.domain.com/links/allelse.php');
- exit;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement