Skip to Main Content
PHP and MySQL™ Phrasebook
book

PHP and MySQL™ Phrasebook

by Christian Wenz
October 2012
Intermediate to advanced content levelIntermediate to advanced
360 pages
4h 57m
English
Addison-Wesley Professional
Content preview from PHP and MySQL™ Phrasebook

11. Communicating with Others

Most of the previously discussed 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

<xmp> <?php   echo file_get_contents('http://www.php.net/'); ?> </xmp>

Reading in an HTTP Resource (http-file.php)

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, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PHP 7 Programming Blueprints

PHP 7 Programming Blueprints

Jose Palala, Martin Helmich

Publisher Resources

ISBN: 9780133040340Purchase book