Categories
PHP

Trigonometry, Exponential and Logarithmic Functions

PHP supports the set of trigonometry functions, the PHP’s mathematical library also includes the exponential and logarithmic functions.

Categories
PHP

Reordering array elements with array_reverse( )

Often it’s useful to consider an array in reverse order. The array_reverse( ) function creates a new array by reversing the elements from a source array.

Categories
PHP

Using Generators and Yield

PHP generators are a powerful feature that allow you to create iterators without writing a class that implements the Iterator interface.

Categories
PHP

Using SFTP

FTP is not a secure protocol and should not be used. PHP also offers SSH-based functions that helps you to create a secure FTP (SFTP) connection to your web server.

Categories
PHP

Connecting with FTP Server

PHP comes with built-in support for FTP and a special set of functions that implement the complete FTP functionality defined in the associated Request for Comment (RFC).

Categories
PHP

Check if Server is Online

If you have a web server and you want to check periodically if it didn’t crash again. Just create a PHP script, open a socket to the server with fsockopen() function, and wait. After the time specified in the $timeout parameter has elapsed, you know if the server is online or offline.

Categories
PHP

How to open a socket connection

PHP can communicate with other servers using sockets. Sockets allow data exchange between processes on the same or different servers. PHP uses the fsockopen() function to open a socket connection to a web server.

Categories
PHP

Automatically Generating WSDL

As mentioned previously, current Web Services almost always use WSDL (Web Services Description Language) to describe the operations and parameters of your service. Writing WSDL files manually is a real pain and error-prone, but most serious Web Services implementations for PHP can automatically create WSDL.

Categories
PHP

SOAP Web Service

How to create a SOAP service in PHP. You will write code in two files: a server file and a client file. The server file defines the functions that the service can perform, and the client file calls those functions and displays the results.

Categories
PHP

Web Services – Yet Another RPC Framework

A web service is an interfaceless application that can be called to process information. In PHP, a web service can provide the functionality remotely on a web server.