Skip to content
This repository was archived by the owner on Mar 15, 2026. It is now read-only.

khianvictorycalderon/php-api-response

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

PHP API Response

My first experiment with PHP as an API. (With CORS).

Prerequisites

  • Apache I recommend using XAMPP as it comes with built-in Apache for PHP.

Setup

  1. Go to you XAMPP htdocs directory (usually in C:\xampp\htdocs, depending on where you installed your XAMPP)
  2. Clone this repository by running git clone https://github.com/khianvictorycalderon/php-api-response.git
  3. Start Apache from XAMPP control panel.
  4. Use Apixer as an API tester.
  5. Go to your browser and type localhost/php-api-response/api/user to test API Endpoints!

API Endpoints

  • /api/user (GET) – Get all users.
  • /api/user?id={id} (GET) – Get single user by ID.
  • /api/user (POST) – Create new user (mock only).

About

A usage of PHP as an API. (CORS-Error Free).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages