Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

13 May 2018

How to consume or call REST API in PHP

REST API call in PHP

It was very tough days for me after developing RESTful Web service in PHP using SLIM framework, I was excited to use it in my PHP project itself like we consume REST API in Android development. But I have no idea how can I consume or call REST API from my PHP project. 

I searched and talk to PHP developer friends a lot but there is no luck because all suggesting to me to use framework for this. But I want to use it into PHP core for better understanding. Because I have no background in PHP, I am an Android Application Developer. I learn PHP for fun or my own project. 

I learn a lot in this process. The solution lies inside PHP itself. Php has a library which is called cURL, used in calling RESTful web service or REST API.

5 May 2018

How to develop PHP web service part 3: Connecting to Database and get result in JSON formate

In both previous tutorials, I am talking about basics. How you can set up PHP web service or REST API development setup, basic REST API call, etc. In this tutorial, I am going to share with you how you can connect to the database, execute queries, and get results in JSON format in RESTful API. So without wasting time let's start our study.

rest api or web services development using php slim framework image

You haven't read my previous tutorial then read them by the following link


How to develop php web service part 1:Basic set-up for development

24 February 2018

How to develop PHP web service part 2:Routing and removing index.php name from URL


In these tutorials I am going to teach you how to go the next level of developing PHP web service or REST API. REST API has great demand at this time. Using REST API developer build database connection to once and can use with websites, Mobile development i.e Android and IOS app development

If you haven't read our prior post. Do read it

How to develop php web service part 1:Basic set-up for development

web service in php

Php is an easy and quick learning language. As PHP version increasing, new feature is coming to PHP.
I have spent so much time learning and develop PHP web service for my android app and website. There are a lot of tutorials available but what I feel from those tutorials that they are not writing for a basic PHP learner. I want to solve this. Therefore I am starting this tutorial for all PHP beginner learners. We will go step by step with a detailed analysis of code. You will learn here to develop web service, how to consume rest API in PHP website and android app. So bookmark this website.

For a beginner, What is REST or RESTful API development

A RESTful API is an application program interface (API) that uses HTTP requests to GET, PUT, POST, and DELETE data.
A RESTful API -- also referred to as a RESTful web service -- is based on representational state transfer (REST) technology, an architectural style, and approach to communications often used in web services development.

Ads Inside Post