Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- function MobileCheck() {
- global $HTTP_USER_AGENT;
- $MobileArray = array("iphone","lgtelecom","skt","mobile","samsung","nokia","blackberry","android","android","sony","phone");
- $checkCount = 0;
- for($i=0; $i<sizeof($MobileArray); $i++){
- if(preg_match("/$MobileArray[$i]/", strtolower($HTTP_USER_AGENT))){ $checkCount++; break; }
- }
- return ($checkCount >= 1) ? "Mobile" : "Computer";
- }
- if(MobileCheck() == "Computer"){
- echo "PC 에서 접속은 불가능 합니다.";
- return;
- }else if(MobileCheck() == "Mobile"){
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement