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.

Categories
PHP

Validating HTML and XML

How to validate XML and HTML files (or strings) with PHP’s DOMDocument class.

Categories
PHP

Handling Errors While Parsing XML

How to use libxml extension to handle errors while parsing XML string or file.

Categories
PHP

Parsing XML with SAX

With SAX Parser, you create functions to deal with specific events, for example, the start or end of an XML element (tag). When the parser encounters an XML element, it calls the event handler functions to process that element.