Tech Tutorials Database
GeekArticles Web Programming PHP

Using Sockets in PHP

Category: PHP
Comments (0)

Armel Fauveau PHP can open sockets on remote or local hosts. Here is a hands-on example of using such a socket: getting connected to a Usenet News Server, talking to this server, and downloading some articles for a precise newsgroup. Opening a socket in PHP Sockets are opened using fsockopen(). This function is both available in PHP3 and PHP4. It uses the following prototype : int fsockopen (string hostname, int port [, int errno [, string errstr [, double timeout]]]) For the Internet...n


Sponsored Links

Read Next: Best Practices: PHP Coding Style