Skip to content

Instantly share code, notes, and snippets.

@nansenat16
Created April 4, 2013 12:36
Show Gist options
  • Save nansenat16/5310019 to your computer and use it in GitHub Desktop.
Save nansenat16/5310019 to your computer and use it in GitHub Desktop.
<?php
if(isset($_SERVER['HTTP_USER_AGENT'])){
$l=array('Android','iPhone','iPad');
foreach($l as $item){
if(stripos($_SERVER['HTTP_USER_AGENT'],$item)!==false && !isset($_GET['pda'])){
header('location: ?pda');
exit;
}
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment