How to Redirect Website to a Mobile Version when Accessed on a Mobile Device
if (screen.width <= 800) { window.location = "http://m.domain.com";} <?php
$iphone = strpos($_SERVER[‘HTTP_USER_AGENT’],”iPhone”);
$android = strpos($_SERVER[‘HTTP_USER_AGENT’],”Android”);
$palmpre = strpos($_SERVER[‘HTTP_USER_AGENT’],”webOS”);
$berry = strpos($_SERVER[‘HTTP_USER_AGENT’],”BlackBerry”);
$ipod = strpos($_SERVER[‘HTTP_USER_AGENT’],”iPod”);
if ($iphone || $android || $palmpre || $ipod || $berry == true)
{
echo “](https://s3.amazonaws.com/woocms.woorank.com/2020/05/poor-mobile-optimization.png”;
}
?>
Also in PHP:
- base64 file php
- add column to migration laravel
- ADjust time limit php
- dispaly object type php
- convert stdclass object to array php
- ->sale_price
- base64 to image
- compuser laravel
- column of csv to array php
- curl multi exec
- Modularizing laravel 8.0
- check string contain php
- date format php from string
- What parameter should you enable if you wish for your browser to show all errors?
- create migration, controller, model and seeder laravel
- C:\MyScans in php server run file
- array key exists and is true
- /phpspreadsheet 1.15.0 requires ext-dom * centos
- ccodeignter insert return inserred id where
- composer global in laravel means
- ALL CODE FOR DATABASE PHP
- code cesar php
- Shorten long numbers to K/M/B?
- check to see in string contains a specifc word php