Returns information about an NNTP server.
If the requested messages don't exist, nttp_get() returns NULL.
Get a list of all groups from the server 'news.openlinksw.com', port 119:
nntp_get ('news.openlinksw.com:119', 'list');
This call returns an array of the form Array ((<group 1> varchar, <last message> integer, <first message> integer, <posting allowed> varchar ) (<group 2> . . . . ) . . . )
ARTICLE, HEAD, BODY, STAT To get the bodies of all messages in the group 'openlink.public.virtuoso':
nntp_get ('news.openlinksw.com:119', 'body', 'openlink.public.virtuoso');
This call returns an array of the form Array ((<message number> integer, <body of message> blob) . . . )
To get the article (head + body) of messages numbered from 5 to 10 in the group 'openlink.public.virtuoso':
nntp_get ('news.openlinksw.com:119', 'article', 'openlink.public.virtuoso', 5, 10);
This call returns an array of the form Array ((<message number> integer, <body of message> blob) . . . )
To get the headers of messages numbered from 7 to the end of the 'openlink.public.virtuoso' group:
nntp_get ('news.openlinksw.com:119', 'head', 'openlink.public.virtuoso', 7);
To get the status of all messages in the group 'openlink.public.virtuoso':
nntp_get ('news.openlinksw.com:119', 'stat', 'openlink.public.virtuoso',);
This call returns an array of the form Array ((<message number> integer, <message ID> varchar) . . . )
To get the status of the 'openlink.public.virtuoso' group:
nntp_get ('news.openlinksw.com:119', 'group', 'openlink.public.virtuoso');
This call returns an array of the form Array (<number of messages> integer, <first message> integer, <last message> integer)
The Virtuoso News Server listening port is configured in the HTTP section of the virtuoso.ini file.
[HTTPServer] NewsServerPort = 119
If the port is not defined Virtuoso will disable the News Server subsystem.
The server supports the following commands:
To add a new newsgroup you must insert a row into the table DB.DBA.NEWS_GROUPS. Below is an example of an insert statement that you could use to do this:
insert into DB.DBA.NEWS_GROUPS (NG_NAME, NG_DESC, NG_UP_INT, NG_CLEAR_INT, NG_POST, NG_UP_TIME, NG_OUT_GROUP, NG_NUM, NG_FIRST, NG_LAST, NG_SERVER, NG_SERV_PORT, NG_CREAT, NG_UP_MESS, NG_PASS) values ('openlink.public.virtuoso', 'virtuoso news group' , update interval, clear interval, 1, now(), 'openlink.public.virtuoso', 0, 0, 0, 'news.openlinksw.com', 110, now(), 0, 0);
If the group you want to add is local, change news.openlinksw.com to localhost, change the port to 0, and the external name to '' (that is, two single quotes).
See also the Newsgroups Administration section of the Visual Server Administration Interface.
Previous
Mail Delivery & Storage |
Chapter Contents |
Next
MIME & Internet Messages |