O'Reilly logo

PHP Phrasebook: Essential Code and Commands by Christian Wenz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Communicating with Others

Most of the previous phrases worked within the ecosystem of the PHP script and the web server in use. However, because some phrases can also be understood by others, this chapter covers some examples of this type. You can connect to remote servers in a variety of ways.

Connecting with HTTP Servers

Hypertext Transfer Protocol (HTTP) is probably the protocol most often used from PHP to connect with others (apart from various database protocols). Starting with PHP 4.3, it is really easy to connect to such data sources because PHP's stream support was vastly improved in that version (of course, using HTTP in the way this code shows was already ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required