Home » Networking » Net_NNTP
NNTP implementation
This package is unmaintained.
Download latest release 1.5.2 (archived versions might be outdated)
License: W3C
Description
PEAR's package for communication with NNTP/Usenet servers.
Net_NNTP handles the connection and protocol level commands (RFC977), including many commonly implemented non-standard commands (RFC2980).
Net_NNTP includes an unserfriendly API for intermediate user, who don't want to work directly at the command level. However, Net_NNTP does require some knowlege about the NNTP protocol (RFC 977), and general knowledge about email (RFC(2)822) and MIME (2045-2048), since any handling of both content and headers is left up to the user!
The protocol implementation does not parse the actual article data, but at the command level it splits returned data at protocol specified boundaries where appropriate.
Documentation
Maintainers
- Heino H. Gehlsen (heino) — lead, active
- Jan-Pascal van Best (janpascal) — contributor, inactive
Dependencies
Required
- PHP (>= 5.0.0)
- PEAR Installer (>= 1.4.5)
- PEAR (>= 1.4.0)
Optional
- Log (>= 1.8.7)
Releases
- 1.5.2 (stable, 2017-08-30)
Release notes
License: W3C
- Fix bug #20941, PR #2 @ GitHub: "Clear openssl error messages before and after fgets calls" (thanks @zrtq)
- Fix bug #21236: "Line starting with dot is not dot stuffed" (thanks @mesa57 / Jan Franken)
- Change to absolute file locations in require-once() - 1.5.2RC1 (beta, 2017-08-21)
Release notes
License: W3C
- Fix bug #20941, PR #2 @ GitHub: "Clear openssl error messages before and after fgets calls" (thanks @zrtq)
- Fix bug #21236: "Line starting with dot is not dot stuffed" (thanks @mesa57 / Jan Franken)
- Change to absolute file locations in require-once() - 1.5.1 (stable, 2017-08-13)
Release notes
License: W3C
- Fix a few serious typos
+ Better handling of timeouts
+ Add pause between each line to avoid CPU overload
- Fix calls to nonexistent error()
- Minor fixes in demo - 1.5.1RC1 (beta, 2017-07-25)
Release notes
License: W3C
- Fix a few serious typos
+ Better handling of timeouts
+ Add pause between each line to avoid CPU overload
- Fix calls to nonexistent error()
- Minor fixes in demo - 1.5.0 (stable, 2013-05-31)
Release notes
License: W3C
+ Fix limited buffer for large replies from server (bug# 18875)
+ Fix NNTP injection vulnerability (reported by Brendan Coles, itsecuritysolutions.org)
+ Fix XXS vulnerability in demo (reported by Brendan Coles, itsecuritysolutions.org)
+ Added support for STARTTLS encryption
+ Use PHP's streams instead of Net_NNTP (to allow easy TLS encryption and future on demand data compressed)
+ Improved logging with notices for most commands
+ Added warning about feof() defect in PHP 5.2.11 (bug #49706)
+ Fix usage of deprecated split() (bug #17417 and #17783)
+ Fix for large groups on 32 bit systems: Article numbers are no longer cast into integers, but passed on directly from the server as strings (bug #17689). This _could_ possibly have implications and should considered a possible backward compatibility breakage, but is thought to be acceptable, since PHP is expected to cast into integers/floats as needed... - 1.5.0RC3 (beta, 2013-05-31)
- 1.5.0RC2 (beta, 2011-10-05)
Release notes
License: W3C
+ Fix limited buffer for large replies from server (bug# 18875)
+ Fix NNTP injection vulnerability (reported by Brendan Coles, itsecuritysolutions.org)
+ Fix XXS vulnerability in demo (reported by Brendan Coles, itsecuritysolutions.org)
+ Added support for STARTTLS encryption
+ Use PHP's streams instead of Net_NNTP (to allow easy TLS encryption and future on demand data compressed)
+ Improved logging with notices for most commands
+ Added warning about feof() defect in PHP 5.2.11 (bug #49706)
+ Fix usage of deprecated split() (bug #17417 and #17783)
+ Fix for large groups on 32 bit systems: Article numbers are no longer cast into integers, but passed on directly from the server as strings (bug #17689). This _could_ possibly have implications and should considered a possible backward compatibility breakage, but is thought to be acceptable, since PHP is expected to cast into integers/floats as needed... - 1.5.0RC1 (beta, 2011-08-17)
Release notes
License: W3C
+ Fix NNTP injection vulnerability (reported by Brendan Coles, itsecuritysolutions.org)
+ Fix XXS vulnerability in demo (reported by Brendan Coles, itsecuritysolutions.org)
+ Fix usage of deprecated split() (bug #17417 and #17783)
+ Fix for large groups on 32 bit systems: Article numbers are no longer cast into integers, but passed on directly from the server as strings (bug #17689). This _could_ possibly have implications and should considered a possible backward compatibility breakage, but is thought to be acceptable, since PHP is expected to cast into integers/floats as needed... - 1.5.0a1 (alpha, 2009-10-04)
Release notes
License: W3C
+ Added support for STARTTLS encryption
+ Use PHP's streams instead of Net_NNTP (to allow easy TLS encryption and future on demand data compressed)
+ Improved logging with notices for most commands
+ Added warning about feof() defect in PHP 5.2.11 (bug #49706) - 1.4.0 (stable, 2008-06-17)
Release notes
License: W3C
Finally released as stable - after two years as release candidate...
- 1.4.0RC1 (beta, 2006-06-17)
- 1.3.3 (beta, 2006-02-06)
Release notes
License: W3C
+ Changes in Net_NNTP_Protocol_Client:
- fix bug #6618: notices in cmdListNewsgroups() - 1.3.2 (beta, 2005-12-27)
Release notes
License: W3C
+ Changes in Net_NNTP_Client:
- getNewArticles() and getNewGroups() now validates that any strtotime() convertions was successfull.+ Changes in Net_NNTP_Protocol_Client:
- fix bug #6334: cmdNewNews() and cmdNewGroups() no longer localize the timestamp depending on timezones. - 1.3.1 (alpha, 2005-12-22)
Release notes
License: W3C
+ Changes in Net_NNTP_Client:
- added: mail() as a replacement for experimental post() using identical parameters as PHP's mail() function, (temporarily) preserving backward compatibility with experimental method in v1.0.
- modified and rewritten: post(), reduced to having only one parameter, (temporarily) preserving backward compatibility with experimental method in v1.0.+ Changes in Net_NNTP_Protocol_Client:
- added: _sendArticle()
- modified and rewritten: cmdPost() split into cmdPost() and cmdPost2() + now sends data via _sendArticle()
- modified and rewritten: cmdIhave() split into cmdIhave() and cmdIhave2() + now sends data via _sendArticle() - 1.3.0 (alpha, 2005-12-14)
- 1.2.5 (alpha, 2005-11-27)
Release notes
License: W3C
+ getHeaderField() added
+ getReferencesOverview() rewritten
+ cmdOver() added
+ cmdHelp() added
+ cmdXHdr() added
+ cmdCapabilities() added
+ cmdXOver() rewritten
+ cmdListOverviewFmt rewritten
+ cmdNext() modified
+ cmdPrevious() modified
+ cmdStat() modified
+ connectAuthenticated() removed
+ examples rewritten - 1.2.4 (alpha, 2005-10-20)
Release notes
License: W3C
+ Fix: connect() now returns false when posting is prohibited, like cmdModeReader() does
+ New: Response code constants
+ Misc. internal rewrites in protocol implementation:
- Expected response codes in cmdArticle(), cmdHead() and cmdBody() reduced to correspond actual implementations.
- First parameter in cmdXOver(), cmdXROver() and cmdListgroup() is now optional.
- New third optional parameter in getNewNews() and cmdNewnews().
- cmdNext(), cmdLast() and cmdStat() now returns array by default. - 1.1.2 (beta, 2005-05-20)
Release notes
License: W3C
+ Three new Net_NNTP_Client methods: getArticle(), getHeader() and getBody() - stripped down versions from the v1.2 releases (no default return classes).
- 1.2.3 (alpha, 2005-05-13)
Release notes
License: W3C
+ New method in Net_NNTP_Client: getBody().
+ Added parameters to Net_NNTP_Client::getArticle/getHeader() to allow use of external return classes.
+ Added status response code constants in Net_NNTP_Protocol_Clients. - 1.2.2 (alpha, 2005-03-28)
- 1.1.1 (beta, 2005-03-28)
Release notes
License: W3C
+ Net_NNTP_Client::connectAuthenticated() removed - it should only exist in the MAINT_1_2 branch for now (was not removed by mistake in the v1.1.0 release).
- 1.0.1 (stable, 2005-03-28)
Release notes
License: W3C
+ Fixes lack of $fp property in historical Net_NNTP class (only relevant for backward compatibility with v0.2.5).
+ Fixes typo in examples. - 1.2.1 (alpha, 2005-03-13)
Release notes
License: W3C
+ New methods in Net_NNTP_Client: selectArticle(), selectNextArticle() and selectPreviousArticle().
+ New methods in Net_NNTP_Protocol_Client: cmdStat(), cmdNext() and cmdLast(). - 1.0.0 (stable, 2005-01-18)
Release notes
License: W3C
+ This release is NOT backward compatible with v0.11.3, since all non-stable features (classes, methods etc.) have been removed!!!
+ Users of releases between 0.3.x and 0.11.x should consider v1.1.x or v1.2.x in stead. (This release is meant only as a final replacement for v0.2.5 - and of cause as a way to finally get rid of the former protocol implementation).
+ Backward compatible with v0.2.5 (this is ONLY guarantied in v1.0.x releases, and may be removed in the future). - 1.2.0 (alpha, 2005-01-14)
Release notes
License: W3C
+ Corresponds to v0.11.3 (exact feature match).
- 1.1.0 (beta, 2005-01-14)
Release notes
License: W3C
+ This release is NOT fully backward compatible with v0.11.3, since experimental features (Net_NNTP_Message and Net_NNTP_Header and related methods Net_NNTP_Client::getArticle() and Net_NNTP_Client::getHeader()) have been removed (users of those features should consider v1.2.x in stead).
- 1.0.0RC1 (beta, 2005-01-14)
Release notes
License: W3C
+ This release is NOT backward compatible with v0.11.3, since all non-stable features (classes, methods etc.) have been removed!!!
+ Users of releases between 0.3.x and 0.11.x should consider v1.1.x or v1.2.x in stead. (This release is meant only as a final replacement for v0.2.5 - and of cause as a way to finally get rid of the former protocol implementation).
+ Backward compatible with v0.2.5 (this is ONLY guarantied in v1.0.x releases, and may be removed in the future). - 0.11.3 (beta, 2004-09-06)
Release notes
License: W3C
+ Going beta (features not documented in the manual should still be considered experiemental).
+ Added the 'distributions' parameter to getNewGroups() and cmdNewGroups(). - 0.11.2 (alpha, 2004-08-22)
Release notes
License: W3C
+ Update PhpDoc blocks.
+ Changed xmdXOver(),cmdXROver(),getOverview() and getReferencesOverview() into using only parameter: $range.
+ Fixes whitespace in Net_NNTP_Client, Net_NNTP_Protocol_Client and Net_NNTP. - 0.11.1 (devel, 2004-07-30)
Release notes
License: W3C
+ Fixes bug in (deprecated) Net_NNTP::command().
+ Rename a few constants due to renamed classes (BC preserved).
+ Update class phpdoc blocks. - 0.11.0 (devel, 2004-07-19)
Release notes
License: W3C
+ New directory structure (classes/files renamed/moved) to allow future server class (dummy files preserves backward compatibility).
- 0.2.5 (stable, 2004-07-19)
Release notes
License: PHP 2.0
+ post() rewritten to allow posting using authentication (bug #817).
+ Examples moved into docs to comply with the standard PEAR directory structure. - 0.10.3 (alpha, 2004-07-14)
Release notes
License: W3C
+ Fixes undefined property warning.
- 0.10.2 (alpha, 2004-07-06)
- 0.10.1 (alpha, 2003-11-24)
- 0.10.0 (alpha, 2003-10-14)
Release notes
License: W3C
+ Merges v0.3.3 and v0.9.4 into one package (The 'Net_NNTP' class from v0.9.x is now called 'Net_NNTP_Realtime').
- 0.2.3 (stable, 2003-09-20)
Release notes
License: PHP 2.0
+ Incorrect handling of the XROVER extension in getOverview() removed.
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #4 | Closed | Bug | 2003-09-12 | cmdXROver() | |
| #7 | Closed | Bug | 2003-09-14 | Lines longer than 998 chars makes download stop | |
| #85 | Closed | Bug | 2003-10-10 | wrong private variable reference | |
| #817 | Closed | Bug | 2004-02-20 | post() doesnt work (v0.2.3) | |
| #825 | Closed | Bug | 2004-02-21 | Assignment to $this | |
| #1396 | Closed | Bug | 2004-05-13 | Performance is _very_ slow | |
| #1712 | Bogus | Bug | 2004-06-24 | POST( jumbles required order? | |
| #1803 | Closed | Bug | 2004-07-06 | Retrieval of newsgroup descriptions fails | |
| #2281 | Bogus | Req | 2004-09-05 | group description in getGroups() | |
| #2282 | Bogus | Req | 2004-09-05 | references | |
| #2285 | Bogus | Req | 2004-09-06 | feature references overview with XHDR | |
| #2406 | Bogus | Bug | 2004-09-27 | bug in post method (isConnected to be exact) | |
| #3967 | Closed | Bug | 2005-03-27 | Net_NNTP_Header | |
| #6334 | Closed | Bug | 2005-12-22 | Wrong timestamps on non-GMT timezones | |
| #6618 | Closed | Bug | 1.3.2 (& 1.0.1) | 2006-01-29 | Undefined variable or offset |
| #6833 | Closed | Bug | 1.3.3 | 2006-02-18 | mail() does not work |
| #6845 | Closed | Bug | 1.3.3 | 2006-02-20 | Undefined variable: forceNames |
| #6855 | Bogus | Bug | 1.3.3 | 2006-02-21 | unexpected responses when connecting to localhost |
| #7149 | Bogus | Bug | 1.3.3 | 2006-03-18 | memory leak |
| #11863 | No Feedback | Bug | 1.0.1 | 2007-08-19 | Undefined offset |
| #14942 | Wont fix | Req | CVS | 2008-11-03 | Improve PHPCS results (tabs vs spaces) |
| #16488 | No Feedback | Req | 1.4.0 | 2009-08-03 | using Net_NNTP_Client::getOverview doesn't seem to compress data |
| #16657 | Bogus | Bug | 1.4.0 | 2009-09-29 | Net_NNTP problems with PHP 5.2.11 |
| #17417 | Closed | Bug | 1.4.0 | 2010-05-19 | Replace split() |
| #17689 | Closed | Bug | 1.5.0a1 | 2010-08-10 | Int casting causes incorrect values for large groups on 32-bit systems |
| #17783 | Closed | Bug | SVN | 2010-08-22 | Patch: Avoid usage of split |
| #18875 | Closed | Bug | 1.5.0RC1 | 2011-09-26 | Some typos and a buglet |
| #19227 | Duplicate | Bug | 1.5.0RC2 | 2012-01-15 | Missing 3rd parameter in version_compare() |
| #19752 | Wont fix | Bug | 1.5.0RC2 | 2012-12-16 | connect() returns false even if it successfully connects & E_STRICT warnings |
| #19753 | Closed | Bug | 1.5.0RC2 | 2012-12-16 | noisy version_compare warning |
| #20941 | Closed | Bug | Forked version of Net_NNTP | 2015-08-21 | NNTP Client unstable with PHP 5.5.25+ / 5.6.11+ |
| #21236 | Closed | Bug | 1.5.1 | 2017-08-19 | Line with starting dot is not dot stuffed |
| #21252 | Wont fix | Req | 1.5.2 | 2017-10-23 | composer.json require pear |
| #21254 | Bogus | Bug | 1.5.2 | 2017-11-02 | PHP notice when exception occurs |