Tagged: ios

0

A simple iOS / Android traffic splitter in PHP

The following basic PHP code will split traffic by device with iOS traffic going to the first out link, Android to the second and leftovers to the third. <?php     $ua = strtolower($_SERVER[‘HTTP_USER_AGENT’]);     if (strpos($ua,’iphone’) !== false || strpos($ua,’ipod’) !== false || strpos($ua,’ipad’) !== false) {         $out = ‘https://iosoutlink.com/’;     } elseif (strpos($ua,’android’) !== false) {         $out = ‘https://androidoutlink.com’;     } else {       ...