Article View: news.software.nntp
Article #54191Re: Writing a Posting Program
From: AvA
Date: Tue, 11 Sep 2001 12:45
Date: Tue, 11 Sep 2001 12:45
46 lines
2114 bytes
2114 bytes
Rhino wrote:
> I think I need to write a simple posting program and need some information
> on how to do it. I'm an experienced programmer in several languages so I
> don't need to know how to program, just how to compose and post usenet
> messages.
>
> <snip>
If you have perl installed (from activestate in your case), then it is a
fairly simple script.
#!/usr/bin/perl -w
use strict;
use Net::NNTP;
my @array =( "news.announce",
"news.software.nntp"
);
my $nntp= Net::NNTP->new("news.workbenelux.nl") or die "can't
connect to server: $@\n";
foreach (@array){
my @header= (
"Newsgroups: $_\n",
"Subject: announcement\n",
"From: webmaster\@someorg.org\n",
"Organization: someorg.org\n",
"\n\n",
"hello this is a new announcement\n
blah blah\n");
if ($nntp->postok()){
$nntp->post(\@header) or warn $nntp->message;
}
}
$nntp->quit;
Technical Details
Message-ID:
<3B9E0A8D.AE866FF0@home.nl>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news2.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newshub2.home.com!news.home.com!newshub1.nl.home.com!news.nl.home.com!dbsch1.home.nl.POSTED!not-for-mailReferences:
<hJsl7.25009$v%4.2629859@news20.bellglobal.com>Show Full Headers
Complete Article Headers
Message-ID: <3B9E0A8D.AE866FF0@home.nl> Subject: Re: Writing a Posting Program Date: Tue, 11 Sep 2001 12:45:14 GMT From: AvA <a.v.a@home.nl> References: <hJsl7.25009$v%4.2629859@news20.bellglobal.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news2.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newshub2.home.com!news.home.com!newshub1.nl.home.com!news.nl.home.com!dbsch1.home.nl.POSTED!not-for-mail X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: news.software.nntp Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 45 NNTP-Posting-Host: 213.51.154.140 X-Complaints-To: abuse@home.nl X-Trace: dbsch1.home.nl 1000212314 213.51.154.140 (Tue, 11 Sep 2001 14:45:14 MET DST) NNTP-Posting-Date: Tue, 11 Sep 2001 14:45:14 MET DST Organization: @Home Network