PHP REST API

PHP & REST API Tutorial to learn PHP & REST API online for free.

REST and other APIs are used to provide communication between two systems over the network. Therefore, using REST (stands for Representational State Transfer) you can create, read, update or delete information between different applications over the internet or HTTP protocol.

This Tutorial covers HTTP GET, (PUT) CREATE, DELETE, POST (UPDATE) operations using PHP cURL library functions. JSON & XML are two popular data interchange formats.

In this online PHP & REST API training course, we will use dummy REST API to perform CRUD operations using Simple PHP programs

PHP : REST API – Introduction

In this tutorial, we will learn about PHP & REST APIs. REST API provides communication over network using multiple standards like HTTP, JSON, cURL, and XML.

PHP: REST API – file_get_contents()

The easiest way to read data from an API in PHP is the built-in file_get_contents() function. It reads a file into a string, and it can read a URL also. Most APIs…

PHP : REST API – GET data using cURL

cURL (Client URL) is a tool and a library to transfer data with URLs. It supports HTTP, HTTPS, FTP and more, and it is the most popular way to talk to REST…

PHP : REST API – POST data using cURL

An HTTP POST request is used to create new data, like a new user or a new post. In this chapter we send JSON data to an API with cURL. If you…

PHP : REST API – PUT (Update) data using cURL

The HTTP PUT method is used to update an existing record. You send the id of the record in the URL, and the new data in the request body. If you are…

PHP : REST API – DELETE data using cURL

The HTTP DELETE method asks the API to remove a record. Like PUT, the id of the record is written in the URL. If you are new to cURL, read GET data…