Q:

Need my mobile application to connect my website, will this method be better than using an API?

I want my mobile app to connect to my website to get/post data from and to the database, respectively.
I was looking up RESTful APIs (which I don't really understand how the file writing and retrieving gets data from the database), but another method I was thinking was to do the following. Make my app use normal HTTP Requests to specific "API-like" pages. The request can set certain variables to pretty much act like an actual user accessing the page.
For example, to register a user to my site I could POST a request with the postString look something like this:
"registeruser=true&username=NewUser123&password=SecretPass123&email=..."
Would this method be appropriate? Would it be slower than an API? Should I look into using an API instead? Obviously I would place checks to ensure proper client-credentials are in place before it can make any requests.
100% of the requests made by the mobile app will be to get and post data to and from databases.

A:

What you are proposing is very similar to what a RESTful API does.
In a RESTful API, the server also has a number of "API-like pages" (called Resources in REST terms) and normal HTTP requests are used to access and manipulate them.
The main difference between your proposed API (yes, you are also proposing an API) and a RESTful API seems to be how information is transferred in a HTTP POST request. In a RESTful API, the information needed to process a POST request is carried in the body of the request, because you can put a lot more information in there than would fit in the request-string.

An API is an Application Programming Interface, which means that it is an interface that other applications or modules can use to make use of a particular service.
This is in contract to an HMI (Human Machine Interface), which is meant for use by humans.
At any point where two applications or software modules interact with each other, that interaction goes through an API.

