Skip to content

Instantly share code, notes, and snippets.

View hborras's full-sized avatar

Hector Borras hborras

  • Cyberclick
  • Barcelona
View GitHub Profile
@hborras
hborras / redirect_mobile_to_app_store.php
Created May 11, 2018 14:17 — forked from ethaizone/redirect_mobile_to_app_store.php
[PHP] Auto redirect to app store. (Android/IOS)
<?php
// android store
if (preg_match('#android#i', $_SERVER ['HTTP_USER_AGENT'])) {
header('Location: market://details?id=com.google.android.apps.maps');
exit;
}
// ios
if (preg_match('#(iPad|iPhone|iPod)#i', $_SERVER ['HTTP_USER_AGENT'])) {