Wietlol
Wietlol

Reputation: 1071

How do I run a website on a smartphone app?

Recently I started making an app in Cordova.

However, yesterday I found out that PHP and SSI only run on the server of a website instead of the local machine. This means that I cannot run php code locally on my smartphone either. So all login systems, navigation, includes, etc are now unusable in my app.

I would like to know how I can run a smartphone app (simple index.html file) that redirects to a website without using a browser.

Upvotes: 0

Views: 343

Answers (1)

Raymond Camden
Raymond Camden

Reputation: 10857

Your server would expose services that can be called from your Cordova app via XHR. So for example, your PHP code would have a service your mobile app can call, passing in a username and password, and it would return JSON that signifies if the result was good or bad. Essentially your PHP code is just a remote API provider.

Upvotes: 2

Related Questions