Browse Category: PHP


SOAP vs REST, Basic and difference

Before we make the comparison between SOAP vs REST, we should know what they are. SOAP and REST are Web Services – Method of communication between two electronic devices over a network, in this scenario is World Wide Web. Web service is a software function provided at a network address over the web with the service always on as in the concept of Utility computing.

Web API is the very common terminology in web development. A Web API is a development in Web Services where emphasis has been moving to simpler REST (Representational state transfer) based communications. REST API do not require XML-based Web service protocol as SOAP (Simple Object Access Protocol) or WSDL (Web Services Description Language). Continue Reading

php session vs cookie


Passing data from one page to the others is one of the most common feature in web programming such as: user logins, passing error messages, shopping carts…

Storing data across pages using PHP is done with two variables in the global scope, called $_SESSION and $_COOKIE, and although accomplishing the same end goal, the both go about it in very different ways. This article is to give a brief look into PHP SESSION vs COOKIE Continue Reading

PHP Coding Standard

PHP Coding Standard

Before we start coding with PHP, we should take a look on the coding standard elements that are required to ensure a high level of technical.

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.

PSR stands for PHP a Standard Recommendation. This article will show you a set of rules and expectations about how to format PHP code follow PHP Coding Standard. Continue Reading

Find ip address in php

How to find ip address in php

Whatever you do, make sure not to trust data sent from the client.
$_SERVER['REMOTE_ADDR'] contains the real IP address of the connecting party. That is the most reliable value you can find.

$_SERVER['REMOTE_ADDR'] is the actual physical IP address that the web server received the connection from and that the response will be sent to. Anything else is just arbitrary and voluntary information. There’s only one scenario in which you can trust this information: you are controlling the proxy that sets this header. Meaning only if you know 100% where and how the header was set should you heed it for anything of importance. Continue Reading

phpmyadmin login screen

phpMyAdmin installation on Ubuntu 14.04

phpMyAdmin is a free and open source tool written in PHP intended to handle the administration of MySQL with the use of a web browser. It can perform various tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL statements or managing users and permissions. This tutorial will show you the way to install phpMyAdmin on Ubuntu 14.04


Before you get start, you need to have a LAMP(Linux, Apache, MySQL and PHP) installation on your Ubuntu 14.04 server. You can follow this tutorial Install LAMP in Ubuntu server to more detail what you need to have first. Continue Reading

detect PowerPoint PPTX layout

Detect PowerPoint PPTX layout easily by PHP

What is PowerPoint?

PowerPoint is a visual and graphical application, primarily used for creating presentations. With PowerPoint, you can create, view, and present slide shows that combine text, shapes, pictures, graphs, animation, charts, videos, and much more.

What is PHP?

PHP is a server-side scripting language designed for Web development but also used as a general-purpose programming language. Originally created by Rasmus Lerdorf in 1994, the PHP reference implementation is now produced by the PHP Group. While PHP originally stood for Personal Home Page, it now stands for the recursive backronym PHP: Hypertext Preprocessor.

Detect PowerPoint PPTX layout – Case study

If you have to build a web application which allow users upload a PowerPoint PPTX presentation template. But users have only allowed to upload PowerPoint pptx in a particular layout or some of layout format. Then you need to detect PowerPoint pptx layout. Continue Reading

Setup PHP web server

Setup PHP Web Server

You are ready for PHP coding, but don’t know how to start. What you need is a web server. This tutorial will show you two ways of Setup PHP Web Server. The first way is a very easy and convenient to install and configure an AMP (Apache, MySQL, PHP) package, this tutorial will show you how to install XAMPP. The second one is to install and configure each component of AMP separately. Continue Reading