-2

I have an Android application which is a webview. How can I determine in html/php that my website is accessed exclusive from WebView in order to personize things?

DobreMihaela
  • 174
  • 1
  • 10

1 Answers1

0

Use a get param appended to the URL like https://www.xxx.yyy/link/url/details?personId=34

Now your server can read $_GET['personId'] and check who the person is coming into this link. Person with id 34 in the above case.

You can also use a key as you like to determine if this is WebView. Say something like this:

https://www.xxx.yyy/link/url/details?isWebView=1&personId=34

Now your server can read if isWebView = 1 then you know its coming from a WebView

There are other ways to find what type of a client the request is coming from using server variables in PHP $_SERVER

nazim
  • 1,439
  • 2
  • 16
  • 26