Connecting to SSL Servers Using PHP

PHP doesn't have an SSL protocol module per se. Rather, SSL is implemented as a socket transport in PHP's streams model, and is therefore available to any function that uses streams, including file operations, sockets, and FTP. There is also SSL support in the imap, ldap, and curl modules.

images Note For the features described in this section to work, you must be using PHP 4.3.0 or above, and PHP must have been compiled with the --with-openssl switch.

PHP's Streams, Wrappers, and Transports

A stream is a PHP resource that can be read from or written to, or sometimes both. Streams were introduced in PHP 4.3 to provide ...

Get Pro PHP Security: From Application Security Principles to the Implementation of XSS Defenses, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.