News-WWW Gateway

Copyright (C) 1995 by Víctor Parada

Current version is V0.2b 95/01/31

Description

This CGI script acts as a WWW gateway for News, providing access to all the newsgroups available for the WWW server, that are authorized for distribution through the WWW.

It can be linked by Information Services to simplify the maintainance of the Information (this was the motivation of the gateway script).

The gateway provides a nice interfase to News, using HTML+ (HTML 3.0) tags to format the display.

The user can control many of the features in a newsreader (list articles in a newsgroup, retrieve an article, search for a string in a subject, ...) just specifying what (s)he wants to do in the requesting URL. Also, (s)he can follow links contained in articles while reading them.

Using the Gateway

In a HTML document, a provider can put an hypertext anchor as usual, giving a special URL in the HREF argument of it. Doing this, for example, a Home Page can provide a link to the most recent article in some newsgroup, without the need of updating the link each time a new article is posted.

Also, a user can use the "Open Location" command in his/her preferred WWW browser to access the News-WWW Gateway.

The following are the requested actions that can be specified in the URL:

List of available (authorized) groups:
http://www.server:port/cgi-bin/news/
List of newest articles in a group:
http://www.server:port/cgi-bin/news/group.name/
List of articles with subject containing "string" in a group:
http://www.server:port/cgi-bin/news/group.name/?string
List of all articles in a group:
http://www.server:port/cgi-bin/news/group.name/ALL
List of articles numbered from "a" to "b" in a group:
http://www.server:port/cgi-bin/news/group.name/LIST-a-b
List of newer articles numbered from "a" in a group:
http://www.server:port/cgi-bin/news/group.name/NEW-a
List of older articles numbered up to "b" in a group:
http://www.server:port/cgi-bin/news/group.name/OLD-b
Newest article available in a group:
http://www.server:port/cgi-bin/news/group.name/LAST
Article "n" in a group:
http://www.server:port/cgi-bin/news/group.name/n
Article "<id>" in a group:
http://www.server:port/cgi-bin/news/group.name/<id>

Note: http://www.server:port portion of the URL can be ommited if the Gateway is linked from a page at the same host and port number. Also, port number can be omited if it equals to "80".

Gateway Installation

  1. Make sure you have perl(1) (4.036 or higher) in the machine where the httpd server resides.
  2. Make sure your news-server supports XOVER NOV extension command for the NNTP protocol. InterNet News (INN) supports it.
  3. Make sure your news-server can be accessed from the host where the httpd server resides. The script will connect to it using sockets.
  4. Make sure you have write access to the "cgi-bin" directory of your WWW server, or you can have a script to be executed by the httpd server.
  5. Request for the gateway program sending an e-mail to vparada@inf.utfsm.cl or pick it at ftp://ftp.inf.utfsm.cl/pub/utfsm/perl/nw-gw.tgz
  6. Unpack the sources using GNU's gunzip and tar.
  7. Edit the first line of the news script to tell it where perl resides, for example: #!/usr/local/bin/perl.
  8. Edit the few last lines of the news script to tell it the host name of the News server and the socket port number.
  9. Edit the few last lines of the news script to tell it the list of authorized newsgroups and their description.
  10. Copy/move the modified news script to the "cgi-bin" directory of the WWW httpd server. Rename it if required and give it required execution permissons.
  11. Access it with the WWW browser of your choise, opening the URL: http://your.www.host/cgi-bin/news/ (the trailing slash is required; if omited, an automagic redirection is done).
  12. E-mail me your comments, bugs report, ...

Bugs

Wanna see a demo?

At U.T.F.S.M., the gateway is accessed through the following URL: http://www.inf.utfsm.cl/~vparada/cgi-bin/news-demo/

License Agreement and Lack of Warranty:

If you (want to) use this program, please send e-mail to the author. He will try to notify you of any updates made to it.


95/11/05 Víctor Parada (vparada@inf.utfsm.cl)