Mercurial > hg > pnewss
diff fetchnews.php @ 7:01dc7eeaf5df
Added some more checks to article data, added some commands, added 'dot stuffing' for block transfers
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Tue, 12 Apr 2011 14:10:41 +0200 |
parents | 0dcdb73cbcbf |
children | 005339a1b2ce |
line wrap: on
line diff
--- a/fetchnews.php Tue Apr 12 11:41:35 2011 +0200 +++ b/fetchnews.php Tue Apr 12 14:10:41 2011 +0200 @@ -88,10 +88,10 @@ default: print("Sending unknown header $parts[0]\n"); } - if ($line !== NULL) nntp_writeline($socket, $line); + if ($line !== NULL) nntp_writeline_data($socket, $line); } nntp_writeline($socket, ''); - foreach (explode("\r\n", $article['body']) as $line) nntp_writeline($socket, $line); + foreach (explode("\r\n", $article['body']) as $line) nntp_writeline_data($socket, $line); nntp_writeline($socket, '.'); $line = nntp_readline($socket); $code = strtok($line, " \t");