PHPBuilder - Using Sockets in PHP Page 4

RSS Twitter
Articles Php Functions

Using Sockets in PHP - Page 4

by: Armel Fauveau
May 10, 2001

Using sockets in PHP : Get articles from Usenet

Closing the connection

To end the session with the NNTP server, just close the socket using fclose() as you would close a file.


// close connexion


More informatin about fclose() :


We just saw how to open, use then close a socket in a precise context : connecting to an NNTP server and getting back some newsgroup articles. Posting some articles on an NNTP server using the POST command is not much more complicated.
The next step is therefore coding an HTML news client (and get rid of Netscape:p).
It is also very easy to store the articles, index them using some search engine such as ht://dig ( and then you have a web based application for keyword searching some newgroups.
An example of such an application is available at
-- Armel

« Previous Page

Comment and Contribute

Your comment has been submitted and is pending approval.

Armel Fauveau



(Maximum characters: 1200). You have characters left.