An app that pulls WordPress REST API data can be written in any programming language, can be run from any web server, and does not need to use or involve WordPress itself.
The WordPress REST API exposes a site's data as JSON: structured data (arrays and objects) formatted into a single string. PHP and most other programming languages have easy methods for unpacking JSON strings back into structured objects that they can work with.
Retrieving public information is the simplest use of the REST API. It's also possible to access non-public information, and to add, update, or delete data; but these uses require authentication, which is a complex topic.
In this chapter, we'll explore an extremely simple PHP web app built to showcase the usefulness of the WordPress REST API.
The app pulls the titles and dates of WPShout's three most recent Posts, and displays them in an HTML document. The entire app lives in one PHP file, which could be named anything. ...