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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.