PHP can open a socket port on a remote or local host. This article is a small example of using sockets: Connect to a Usenet newsgroup server, talk to servers, and download articles from newsgroups.
Open a socket in PHPUse Fsockopen () to open a socket. This function can be used in both PHP3 and PHP4. The function declaration is this:
int Fsockopen (string hostname, int port _[, int errno [, String errstr [, double timeout]]]
This function will open a
PHP can open a socket port on a remote or local host. This article is a small example of using a socket: even
Receive a Usenet newsgroup server, talk to the server, and download articles from newsgroups.
Open a socket in PHP
Use Fsockopen () to open a socket. This function can be used in both PHP3 and PHP4. function declaration
That is true:
int Fsockopen (string hostname, int port [, int errno [, String errstr [, double timeout]]]
This function will
first step is to select the correct newsgroup with the group command:GROUP GGGThe parameter GGG is the name of the newsgroup to select (for example, "Net.news"), which is required. A list of available newsgroups can be obtained by using the List command. When you select a newsgroup command successfully, returns the article number for the first and last article in the group, and the number of articles in the group.
Here is an example:chrome:~$ Telne
newsgroup. RFC977 points out that the first step is to use the group command to select
The Right newsgroups:
GROUP GGG
The parameter GGG is the name of the newsgroup to select (for example, "Net.news"), which is required. The available new
The list of the sniffing groups can be obtained by using List command. When you select a newsgroup command successfully, the first and most
The article number for the latter article, and the number of articles in t
PHP can open a socket port on a remote or local host. This article is a small example of using a socket: even
Receive a Usenet newsgroup server, talk to the server, and download articles from newsgroups.
Open a socket in PHP
Use Fsockopen () to open a socket. This function can be used in both PHP3 and PHP4. function declaration
That is true:
int Fsockopen (string hostname, int port [, int errno [, String errstr [, double timeout]]]
This function will
Talking to the server
Now that we have connected to the server, we can talk to the server through the socket we opened earlier. Let's say we get the last 10 articles from a newsgroup. RFC977 points out that the first step is to select the correct newsgroup with the group command:
GROUP GGG
Parameter GGG is the name of the newsgroup you want to select (for example, "Net.news"), which is required. Lists of available newsgroups can be obtained by using t
PHP can open a socket port on a remote or local host. This article is a small example of using sockets: Connect to a Usenet newsgroup server, talk to servers, and download articles from newsgroups.
Open a socket in PHP
Use Fsockopen () to open a socket. This function can be used in both PHP3 and PHP4. The function declaration is this:
int Fsockopen (string hostname, int port _
[, int errno [, String errstr [, double timeout]]]
This function wil
Now we have connected to the server to talk to the server through the socket we opened earlier. For example, we want to get the last 10 articles from a news group. RFC977 pointed out that the first step is to use the GROUP command to select the correct Newsgroup: the GROUPggg parameter is the name of the newsgroup to be selected (for example, net. news), which is required. Dialog with the server
Now that we have connected to the server, we can talk to the server through the socket opened previou
Dialog with serverNow that we have connected to the server, we can talk to the server through the socket opened previously. For example, we want to get the last 10 articles from a news group. RFC977 indicates that the first step is to use the GROUP command to select the correct newsgroup:GROUP gggThe ggg parameter is the name of the newsgroup to be selected (for example, "net. news"), which is required. You can use the LIST command to obtain the LIST of available
Use sockets: get articles from newsgroups (3) read articles
Since we have obtained the number of the last article, it is easy to read the last 10 articles. In RFC977, the ARTICLE command can use either the ARTICLE number or its message ID.
Note that the article number is different from its message ID, because each news server assigns its own article number, therefore, the numbers of the same article on two different servers are different, and the mess
. Rfc977 indicates that the first step is to use the group command to select the correct newsgroup:Group gggThe ggg parameter is the name of the newsgroup to be selected (for example, "net. News"), which is required. You can use the LIST command to obtain the list of available newsgroups. After the newsgroup command is selected, the number of the first and last articles in the group and the number of articles in the group are returned.
The following
settings
Set the newsgroup. I don't quite understand what a newsgroup is. Generally, the email server is used to receive the message.
If you don't talk so much about it, go to the topic.
Open our evolution, click "edit"> "Preferences" on the menu bar, and select "add" in the email account ". Then, it is similar to the email set above. However, there are several steps to note that I have provided examples.
Note 1: on the server type of "receive email", select "Usenet News" and enter the name
In ubuntu, how do I subscribe to news from newsgroups? -- Linux general technology-Linux technology and application information. For details, refer to the following section. In ubuntu, how do I subscribe to news from newsgroups? I use Thunderbird. In Thunderbird, click "file"> "new"> "Other accounts" and select "newsgroup account ", then, enter your personal email address and the newsgroup server domain nam
Use sockets in php: obtain articles from newsgroups. PHP can open Socket ports on remote or local hosts. This article is a small example of using Socket: connect to a Usenet newsgroup server, talk to the server, and download some articles from the newsgroup.
Open a socket in phpUse fsockopen () to open a socket. This function can be used in both php3 and php4. The function declaration is as follows:
Int fsockopen (string hostname, int port _[, Int er
Use sockets in php: get articles from newsgroups. PHP can open Socket ports on a remote or local host. This article is a small example of using Socket: connect to a Usenet newsgroup server and talk to the server. download a PHP from the newsgroup to open the Socket port on a remote or local host. This article is a small example of using Socket: connect to a Usenet newsgroup server, talk to the server, and download some articles from the newsgroup.
Op
Dialog with server
Now that we have connected to the server, we can talk to the server through the socket that was opened earlier. Let's say we're going to get the latest 10 articles from a news group. RFC977 points out that the first step is to select the correct newsgroup with the group command:
GROUP GGG
The parameter GGG is the name of the newsgroup to select (for example, "Net.news"), which is required. A list of available newsgroups can be obtai
first step is to select the correct newsgroup with the group command:GROUP GGGThe parameter GGG is the name of the newsgroup to select (for example, "Net.news"), which is required. A list of available newsgroups can be obtained by using the List command. When you select a newsgroup command successfully, returns the article number for the first and last article in the group, and the number of articles in the group.
Here is an example:chrome:~$ Telnet
PHP can open a socket port on a remote or local host. This article is a small example of using a socket: even
Receive a Usenet newsgroup server, talk to the server, and download articles from newsgroups.
Open a socket in PHP
Use Fsockopen () to open a socket. This function can be used in both PHP3 and PHP4. function declaration
That is true:
int Fsockopen (string hostname, int port [, int errno [, String errstr [, double timeout]]]
This function will
($ response server, $ response port, $ errno, $ errstr, $ response timeout );
If (! $ Usenet_handle ){Echo "Connection failed. \ n ";Exit ();}Else {Echo "Connected. \ n ";$ Tmp = fgets ($ usenet_handle, 1024 );}
?>Dialog with server Now that we have connected to the server, we can talk to the server through the socket opened previously. For example, we want to get the last 10 articles from a news group. RFC977 indicates that the first step is to use the GROUP command to select the correct New
Use sockets: get the article from the newsgroup (2) dialog with the server
Now that we have connected to the server, we can talk to the server through the socket opened previously. For example, we want to get the last 10 articles from a news group. RFC977 indicates that the first step is to use the GROUP command to select the correct Newsgroup:
GROUP ggg
The ggg parameter is the name of the newsgroup to be selected (for example, "net. news"), which is required. You can use the LIST command to ob
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.