How can I open a new activity based on the redirect in php

Please see this link. Usually, when we login in forums, in the beginning, we see a welcome page using php code and session. In that link there are html codes and the html codes has been displayed in visitor machine.

The problem is, I do not want to use html code to display the welcome page in android device and I want create a separate layout for the welcome page and if the user can did successful login, he see the welcome layout.

I do not want a complete code from you. I know all of the codes in that link.But I do not want to use the html code in android and I have only welcome layout, so my question is:

When successful login the user, how php aware the android from user login and as the result the android application can choose a welcome layout for user?

Use deep linking