Because this is an AJAX requests to a WordPress plugin, the plugin can also track other data. Like:
- IP address of the app.
- The Remote Host.
- Whether the request came through the TOR network.
- The User Agent
- The Referrer
- The time and date of the request.
All of this data is stuffed into a MySQL database which you can then use to track various statistics about your game, like how many users per day are using your app, which days of the week are the most popular or, combining it with GeoIP data what countries is my app being most used in.
Other features?
- Choose which WordPress category you want to show in the news.
- Posts returned to the C3 app are sorted by date with the most recent at the top.
- Limit the number of posts that are sent back to the C3 app. This means you can write as many news items as you like but the C3 app will only see the first 5, 10, 20, etc.
You can also control the CORS origin (Cross-Origin Resource Sharing). The website where these news articles is coming from is set to allow requests from anywhere. It uses this in the header:
Access-Control-Allow-Origin: *
This means that anyone, anywhere can request news from the WordPress site. You can also change the CORS header to allow news requests only from your site. If you’re only running a web-based app, you can change the CORS header to something like this:
Access-Control-Allow-Origin: http://www.example.com