Created
November 16, 2017 05:46
-
-
Save slick2/43de222e6f38f607d6a36a9d0f5a5fc3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform); | |
if(iOS == true){ | |
var test = getQueryVariable('test'); | |
if(test == '123'){ | |
document.write('Hello World'); | |
} | |
} | |
function getQueryVariable(variable) | |
{ | |
var query = window.location.search.substring(1); | |
var vars = query.split("&"); | |
for (var i=0;i<vars.length;i++) { | |
var pair = vars[i].split("="); | |
if(pair[0] == variable){return pair[1];} | |
} | |
return(false); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
preg_match("/iPhone|Android|iPad|iPod|webOS/", $_SERVER['HTTP_USER_AGENT'], $matches); | |
$os = current($matches); | |
if($os == 'iPhone'){ | |
if($_GET['test']==123){ | |
echo 'Hello World'; | |
exit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment