Created
August 9, 2014 09:02
-
-
Save anova/96fb210b0f09b8dd700f to your computer and use it in GitHub Desktop.
Redirect to instagram who cames from iOS
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 | |
//this code uses mobiledetect ( http://mobiledetect.net ) for detect mobile users | |
include dirname(__FILE__) . '/../mobile-detect/Mobile_Detect.php'; | |
$detect = new Mobile_Detect(); | |
if($detect->isiOS()) { | |
header('Location: instagram://user?username=instagram'); | |
} else { | |
header('Location: http://instagram.com/instagram'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment