Class: Net_NNTP
Source Location: /Net_NNTP-0.10.0/NNTP.php
PEAR
|
--Net_NNTP_Protocol
|
--Net_NNTP
The Net_NNTP class is an almost 100 % backward compatible frontend class to the Net_NNTP_Protocol class.
Author(s):
Version:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
Net_NNTP (Constructor) [line 87]
authenticate [line 245]
mixed authenticate(
string
$user, optional
$pass, [optional
$mode = NET_NNTP_AUTHORIGINAL])
|
|
Auth process (not yet standarized but used any way) http://www.mibsoftware.com/userkt/nntpext/index.html
Parameters:
command [line 906]
mixed command(
string
$cmd)
|
|
Issue a command to the NNTP server
Parameters:
connect [line 116]
mixed connect(
[optional
$host = NET_NNTP_PROTOCOL_DEFAULT_HOST], [optional
$port = NET_NNTP_PROTOCOL_DEFAULT_PORT], [optional
$user = null], [optional
$pass = null], [optional
$authmode = NET_NNTP_AUTHORIGINAL])
|
|
Connect to the newsserver. The function currently allows automatic authentication via the three last parameters, but this feature is to be considered depresated (use connectAuthenticated instead) In the future, this function will just be inherrited from the parent, and thus the last three parameters will no longer be used to authenticate.
Overrides Net_NNTP_Protocol::connect() (Connect to the server)
Parameters:
connectAuthenticated [line 146]
mixed connectAuthenticated(
[optional
$user = null], [optional
$pass = null], [optional
$host = NET_NNTP_PROTOCOL_DEFAULT_HOST], [optional
$port = NET_NNTP_PROTOCOL_DEFAULT_PORT], [optional
$authmode = NET_NNTP_AUTHORIGINAL])
|
|
Connect to the newsserver, and authenticate. If no user/pass is specified, just connect.
Parameters:
count [line 722]
Number of articles in currently selected group
date [line 703]
first [line 775]
Minimum article number in current group
getArticle [line 502]
mixed getArticle(
mixed
$article)
|
|
Get an article (deprecated)
Parameters:
getArticleRaw [line 478]
mixed getArticleRaw(
mixed
$article, [bool
$implode = true])
|
|
Get an article (raw data)
Parameters:
getBody [line 590]
mixed getBody(
mixed
$article)
|
|
Get the body of an article (deprecated)
Parameters:
getBodyRaw [line 566]
mixed getBodyRaw(
mixed
$article, [bool
$implode = true])
|
|
Get the body of an article (raw data)
Parameters:
getDate [line 675]
mixed getDate(
[optional
$format = 1])
|
|
Get the NNTP-server's internal date Get the date from the newsserver format of returned date:
Parameters:
getGroupArticles [line 604]
void getGroupArticles(
mixed
$newsgroup)
|
|
Experimental
getGroups [line 326]
Fetches a list of all avaible newsgroups
getHeaderRaw [line 522]
mixed getHeaderRaw(
mixed
$article, [bool
$implode = true])
|
|
Get the headers of an article (raw data)
Parameters:
getHeaders [line 546]
mixed getHeaders(
mixed
$article)
|
|
Get the headers of an article (deprecated)
Parameters:
getNewGroups [line 618]
void getNewGroups(
mixed
$time)
|
|
Experimental
getNewNews [line 642]
void getNewNews(
mixed
$time, [mixed
$newsgroups = '*'])
|
|
Experimental
getOverview [line 372]
mixed getOverview(
integer
$first, integer
$last)
|
|
Fetch message header from message number $first to $last The format of the returned array is: $messages[message_id][header_name]
Parameters:
getOverviewFmt [line 407]
Returns a list of avaible headers which are send from newsserver to client for every news message
getOverviewFormat [line 392]
mixed getOverviewFormat(
)
|
|
Returns a list of avaible headers which are send from newsserver to client for every news message
getReferencesOverview [line 427]
mixed getReferencesOverview(
integer
$first, integer
$last)
|
|
Fetch a list of each message's reference header.
Parameters:
group [line 808]
isConnected [line 279]
last [line 742]
Maximum article number in current group
max [line 756]
min [line 789]
post [line 458]
mixed post(
string
$subject, string
$newsgroup, string
$from, string
$body, [optional
$aditional = ''])
|
|
Post an article to a number of newsgroups. (Among the aditional headers you might think of adding could be: "NNTP-Posting-Host: <ip-of-author>", which should contain the IP-adress of the author of the post, so the message can be traced back to him. Or "Organization: <org>" which contain the name of the organization the post originates from)
Parameters:
prepareConnection [line 207]
mixed prepareConnection(
string
$host, [optional
$port = 119], string
$newsgroup, [optional
$user = null], [optional
$pass = null], [optional
$authmode = NET_NNTP_AUTHORIGINAL])
|
|
Connect to the newsserver, and issue a GROUP command Once connection is prepared, we can only fetch articles from one group at a time, to fetch from another group, a new connection has to be made. This is to avoid the GROUP command for every article, as it is very ressource intensive on the newsserver especially when used for groups with many articles.
Parameters:
quit [line 178]
Close connection to the newsserver
responseCode [line 873]
integer responseCode(
string
$response)
|
|
returns the response code of a newsserver command
Parameters:
selectGroup [line 299]
mixed selectGroup(
string
$newsgroup)
|
|
Selects a news group (issue a GROUP command to the server)
Parameters:
splitHeaders [line 824]
mixed splitHeaders(
mixed
$article)
|
|
Get the headers of an article from the currently open connection, and parse them into a keyed array.
Parameters:
Documentation generated on Sat, 1 May 2004 00:56:19 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.
|
|