Mobideck / appdeck

AppDeck is a mobile hybrid application engine for iOS and Android.
http://www.appdeck.mobi/
47 stars 22 forks source link

Can the page knows it have been opened by appdeck? #51

Closed myannr closed 8 years ago

myannr commented 8 years ago

Hi, I really need the page opened by appdeck could not being open by other navigators (on a mobile or a desktop).

So I did not find any way to tell the app "if it's appdeck, ok but of not, redirect to 404 page".

Thank you for all your work.

mdekermadec commented 8 years ago

You can check User Agent.

If keyword AppDeck is present, it mean that this page is open with AppDeck.

RoboKopf commented 8 years ago

You can also use this and it is probably more reliable than the UA string:

$_SERVER['HTTP_APPDECK_USER_ID']

This is only set when the request is coming from within an app.