Class: Net_NNTP
Source Location: /Net_NNTP-1.0.0RC1/NNTP.php
Net_NNTP_Protocol_Client
|
--Net_NNTP
The Net_NNTP class is an almost 100 % backward compatible frontend class to the Net_NNTP_Protocol_Client class.
Author(s):
Version:
- $Id: NNTP.php,v 1.30.2.3 2005/01/14 20:07:49 heino Exp $
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
Net_NNTP (Constructor) [line 94]
authenticate [line 263]
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 911]
mixed command(
string
$cmd)
|
|
Issue a command to the NNTP server
Parameters:
connect [line 123]
mixed connect(
[optional
$host = NET_NNTP_PROTOCOL_CLIENT_DEFAULT_HOST], [optional
$port = NET_NNTP_PROTOCOL_CLIENT_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_Client::connect() (Connect to the server)
Parameters:
connectAuthenticated [line 154]
mixed connectAuthenticated(
[optional
$user = null], [optional
$pass = null], [optional
$host = NET_NNTP_PROTOCOL_CLIENT_DEFAULT_HOST], [optional
$port = NET_NNTP_PROTOCOL_CLIENT_DEFAULT_PORT], [optional
$authmode = NET_NNTP_AUTHORIGINAL])
|
|
Connect to the newsserver, and authenticate. If no user/pass is specified, just connect.
Parameters:
count [line 718]
Number of articles in currently selected group
date [line 699]
first [line 770]
Minimum article number in current group
getArticle [line 545]
mixed getArticle(
mixed
$article)
|
|
Get an article (deprecated)
Parameters:
getArticleRaw [line 521]
mixed getArticleRaw(
mixed
$article, [bool
$implode = true])
|
|
Get an article (raw data)
Parameters:
getBody [line 643]
mixed getBody(
mixed
$article)
|
|
Get the body of an article (deprecated)
Parameters:
getBodyRaw [line 619]
mixed getBodyRaw(
mixed
$article, [bool
$implode = true])
|
|
Get the body of an article (raw data)
Parameters:
getDate [line 671]
mixed getDate(
[optional
$format = 1])
|
|
Get the NNTP-server's internal date Get the date from the newsserver format of returned date:
Parameters:
getGroups [line 354]
Fetches a list of all avaible newsgroups
getHeaderRaw [line 570]
mixed getHeaderRaw(
mixed
$article, [bool
$implode = true])
|
|
Get the headers of an article (raw data)
Parameters:
getHeaders [line 594]
mixed getHeaders(
mixed
$article)
|
|
Get the headers of an article (deprecated)
Parameters:
getOverview [line 405]
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 445]
Returns a list of avaible headers which are send from newsserver to client for every news message
getOverviewFormat [line 430]
mixed getOverviewFormat(
)
|
|
Returns a list of avaible headers which are send from newsserver to client for every news message
getReferencesOverview [line 470]
mixed getReferencesOverview(
integer
$first, integer
$last)
|
|
Fetch a list of each message's reference header.
Parameters:
get_article [line 550]
void get_article(
$article)
|
|
Parameters:
get_body [line 648]
get_data [line 895]
get_groups [line 383]
get_headers [line 599]
void get_headers(
$article)
|
|
Parameters:
get_overview [line 415]
void get_overview(
$first,
$last)
|
|
Parameters:
get_overview_fmt [line 450]
group [line 803]
isConnected [line 297]
is_connected [line 302]
last [line 737]
Maximum article number in current group
max [line 751]
min [line 784]
post [line 501]
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 215]
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:
prepare_connection [line 237]
void prepare_connection(
$nntpserver, [
$port = 119],
$newsgroup, [
$user = null], [
$pass = null], [
$authmode = NET_NNTP_AUTHORIGINAL])
|
|
Parameters:
quit [line 186]
Close connection to the newsserver
responseCode [line 873]
integer responseCode(
string
$response)
|
|
returns the response code of a newsserver command
Parameters:
selectGroup [line 322]
mixed selectGroup(
string
$newsgroup)
|
|
Selects a news group (issue a GROUP command to the server)
Parameters:
select_group [line 340]
void select_group(
$newsgroup)
|
|
Parameters:
splitHeaders [line 819]
mixed splitHeaders(
mixed
$article)
|
|
Get the headers of an article from the currently open connection, and parse them into a keyed array.
Parameters:
split_headers [line 855]
void split_headers(
$article)
|
|
Parameters:
Documentation generated on Mon, 11 Mar 2019 14:13:03 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|