Posting news via php
| From: | Andy | Date: | Sun, 11 Aug 2002 12:23:22 +0000 |
| Subject: | Posting news via php | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-112012@lists.php.net to get a copy of this message | ||
Sorry for reposting, but I am still having this problem and the post is back
to far that someone looks at it.
Thank you for any help on this. I appreciate it.
Andy
Hi there,
I am trying to write a script which is posting news to a newsserver.
Unfortunatelly I do get a 535 error back which is not reported in:
http://www.faqs.org/rfcs/rfc977.html Section
3.10.2
Maybe someone of you guys has a clue of an idea what is going wrong.
connecting works, so I did not include the connect code. The code for
posting is underneath.
Thanx for any help on that.
Andy
$cfgServer = "news.php.net";
$cfgNewsGroup = "php.general";
$subject='Test';
$header='
Newsgroups: '.$cfgNewsGroup.'
Path: '.$cfgServer.'
Relay-Version: version B 2.10 2/13/83; site cbosgd.UUCP
Posting-Version: version B 2.10 2/13/83; site eagle.UUCP
From: jerry@eagle.uucp (Jerry Schwarz)
Subject: '.$subject.'
Message-ID: <642@eagle.UUCP>
Date: Friday, 10-Aug-2002 16:14:55 EST
Followup-To: '.$cfgNewsGroup.'
Expires: Saturday, 1-Jan-2003 00:00:00 EST
Date-Received: Friday, 10-Aug-2002 16:59:30 EST
Organization: Bell Labs, Murray Hill
';
$body='\n
This is a test.
';
$message=$header.$body;
$put = fputs($usenet_handle, "POST $message\n");
echo $put;
--