A PHP web application that consumes an external REST API using cURL and JSON to retrieve videogame data and display it dynamically in a responsive web interface.
- Retrieves videogame information from a public REST API.
- Uses
cURLto perform HTTP requests from PHP. - Parses API responses in
JSONformat. - Displays game data dynamically in a clean responsive layout.
- Organizes shared layout and logic into reusable
includes. - Includes generated technical documentation with PHPDoc and PHPDocumentor.
- Includes Apache JMeter test plans for load and concurrency testing.
- Successfully handled concurrent HTTP requests during load testing.
- PHP
- cURL
- JSON
- HTML5
- CSS3
- Apache XAMPP
- PHPDocumentor
- Apache JMeter
php-rest-api-client/
├── css/
├── doc/
├── includes/
├── jmeter/
└── index.php
css/: Stylesheets for the responsive user interface.includes/: Reusable PHP files such as functions, header, and footer.doc/: Generated documentation created with PHPDocumentor.jmeter/: Apache JMeter test plans for performance and load testing.index.php: Main entry point of the application.
- XAMPP installed on your machine
- Apache enabled in XAMPP
- PHP with
cURLenabled - Internet connection to access the external API
- Copy the project folder into:
C:\xampp\htdocs\
- Make sure the project folder is named:
php-rest-api-client
-
Start Apache from the XAMPP Control Panel.
-
Open your browser and visit:
http://localhost/php-rest-api-client/
- The application will connect to the external API and display the videogame information dynamically.
This application consumes the public FreeToGame API:
- Base endpoint:
https://www.freetogame.com/api/games - Response format:
JSON - Request method:
GET
The API provides:
- Game title
- Thumbnail image
- Genre
- Platform
- Release date
- The application sends an HTTP GET request using
cURL. - The JSON response is decoded into a PHP associative array.
- The data is processed and displayed dynamically in the interface.
The application was documented using PHPDoc comments and PHPDocumentor.
phpdoc -d . -t docGenerated documentation is stored in the doc/ directory.
Load testing was performed with Apache JMeter using Concurrency Thread Group.
- Target Concurrency: 200 users
- Ramp Up Time: 10 minutes
- Ramp-Up Steps Count: 10
- Hold Target Rate Time: 5 minutes
- The application handled concurrent HTTP requests successfully.
- The tests confirmed stable behavior during concurrent access scenarios.
JMeter test plans are stored in the jmeter/ directory.
- Add search and filtering by genre or platform
- Implement pagination for larger result sets
- Improve API error handling
- Add caching for external requests
- Improve responsive design and accessibility
- Add automated testing
Jesús Martínez Escobar
Built with PHP, REST APIs, and web technologies to demonstrate API consumption, documentation, and performance testing in a practical backend web project.