posting news via php - 535 error
| From: | andy | Date: | Fri, 09 Aug 2002 06:11:44 +0000 |
| Subject: | posting news via php - 535 error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-111770@lists.php.net to get a copy of this message | ||
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;