How to convert CSV to JSON in PHP

In this example I am going to show you how to convert CSV to JSON using PHP programming language. CSV stands for comma separated values and JSON stands for JavaScript Object Notation. These are actually data formats used for representations. Having data formats in CSV and JSON are advantageous because of their light-weight, easy to representation and easy to parse. JSON format is currently widely used in REST response.

Continue

CodeIgniter 4 REST API, MySQL and Angular 10 CRUD Example

I am going to show you an example on Angular CodeIgniter 4 REST API MySQL CRUD. CRUD is an acronym and stands for Create, Read, Update and Delete operations. REST or RESTful is a Representational State Transfer which defines an architectural style in software engineering. The REST API works on HTTP or HTTPS protocol. The Angular framework will be used in this example for representing the UI (User Interface) where end users will perform CRUD operations.

Continue

REST API CRUD Example in CodeIgniter 4 Framework

Here I am going to show you how to build REST web services in PHP based Codeigniter 4 framework. CodeIgniter 4 is the upcoming version of the framework and it is still under development, intended for use with PHP 7.2 or higher version. REST is an acronym that stands for Representational State Transfer (RESTful), which is an architectural style for distributed applications. PHP based CodeIgniter framework enables developers to develop the projects much faster, it provides the core part that can easily be extended or replaced completely to make the…

Continue

How to setup CodeIgniter 4 manually

Here I am going to show you how to setup CodeIgniter 4 manually in your local environment. CodeIgniter framework version 4 is still under development and its size has been reduced significantly from its previous version. CodeIgniter 4 framework is intended to work with minimum version of PHP 7.2. You can also check the installation guide for other ways. PHP based CodeIgniter framework enables developers to develop the projects much faster, it provides the core part that can easily be extended or replaced completely to make the system work smoothly.

Continue

How to resize bulk images using PHP

Here in this tutorial I am going to show you how to resize multiple images or bulk images using PHP programming language. I am going to use built-in functions from PHP language to scan the directory and resize images. Such functions are scandir(), imagecreatetruecolor(), imagecreatefromjpeg(), imagecopyresized() and imagejpeg(). In this example I am going to scan a particular directory that contains bulk images and one by one I will resize and save the image in the same directory. So the original image will be replaced by the resized image. If…

Continue

How to create and consume SOAP web service using SoapServer and SoapClient in PHP

In this tutorial I am going to show you how to create SOAP web service using SoapServer and how to consume web service using SoapClient in PHP. I am going to create a WSDL or web service definition language file for defining the contract between the server and client. SoapServer is used to create server side implementation of the SOAP service, whereas SoapClient is to used to consume the SOAP service.

Continue

3 ways to consume SOAP web service in PHP

Here I am going to show you how to consume SOAP web service in PHP in 3 ways. To consume SOAP webservice you must have a SOAP web service deployed onto a server. Here I am going to consume or call the SOAP service which is ready made available on the internet. I am calling the CelsiusToFahrenheit which converts temperature from celsius to fahrenheit. You may also create your own service and write a SOAP client to consume the service. The method of consumption is similar to what I am…

Continue

PHP SOAP Web Service Configuration

Here I am going to tell you how to configure PHP SOAP web service. Obviously you can imagine why I am going to show you PHP SOAP configuration. This is required when you are going to create or consume the SOAP web service from your PHP programs. SOAP is an acronym that stands for Simple Object Access Protocol. It is XML based messaging protocol that defines the semantic of the communication structure between two applications. It is both platform and language independent. It supports various protocols while communicating to different…

Continue

How to create multiple thumbnails from a single uploaded image in Codeigniter

Introduction Here in this tutorial I am going to show you how to create multiple thumbnails using PHP based Codeigniter framework from a single uploaded image. Codeigniter provides a file upload class that is used to upload single file or multiple files or even you can create thumbnail(s). This class also permits you to set various preferences, such as, destination where the file and thumbnail will be uploaded, restriction on file types, restriction on file size, whether a file name should be encrypted or not, maximum length of the file…

Continue