rvdv/nntp 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rvdv/nntp

Composer 安装命令:

composer require rvdv/nntp

包简介

Client for communicating with servers through the Network News Transfer Protocol (NNTP) protocol.

README 文档

README

Client for communicating with servers through the Network News Transfer Protocol (NNTP) protocol.

Latest Stable Version Build Status MIT license

Installation

The recommended way to install the library is through composer.

composer require rvdv/nntp

NNTP?

NNTP specifies a protocol for the distribution, inquiry, retrieval, and posting of news articles using a reliable stream (such as TCP) server-client model. NNTP is designed so that news articles need only be stored on one (presumably central) host, and subscribers on other hosts attached to the LAN may read news articles using stream connections to the news host.

-- RFC Abstract (source)

Usage

Here is an example that fetches 100 articles from the php.doc of the news.php.net server:

<?php

use Rvdv\Nntp\Connection\Connection;
use Rvdv\Nntp\Client;

$connection = new Connection('news.php.net', 119);
$client = new Client($connection);

$client->connect();

$overviewFormat = $client->overviewFormat();
$group = $client->group('php.doc');
$articles = $client->xover($group['first'], $group['first'] + 100, $overviewFormat);

// Process the articles further...

$client->disconnect();

Tests

To run the test suite, you need install the dependencies via composer, then run PHPUnit.

$ composer install
$ php vendor/bin/phpunit

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

To get started with development:

git clone https://github.com/robinvdvleuten/php-nntp.git
cd php-nntp
composer install
composer test

Feel free to open an issue to get feedback on your idea before spending too much time on it.

License

Copyright (c) Robin van der Vleuten

Licensed under the MIT License. See LICENSE for details.

统计信息

  • 总下载量: 2.22k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 41
  • 点击次数: 15
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 40
  • Watchers: 9
  • Forks: 13
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-12-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固