使用什么 PHP 类来访问 NNTP
我想通过 PHP 访问 NNTP 服务器、组和消息。 您有推荐的现有课程吗? 最好是 PHP5 和良好的 OOP。
I'd like to access NNTP servers, groups, and messages through PHP. Is there any existing class you'd recommend? Preferably PHP5 and good OOP.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
它不是一个类,但 php 安装必须编译有 php-imap 扩展,并且您可以通过直接 php 调用完成您想要的所有操作。
您可以看到文档从这里开始: http://us.php.net/manual /en/book.imap.php
打开与 NNTP 服务器的连接的示例可以在 imap_open 主题中找到。
像这样:
或者
然后您可以请求您想要的信息:
这不完全是您所要求的,但我希望它有帮助。
It's not a class, but must php installs have the php-imap extension compiled in and you can do all you want with straight php calls.
You can see documentation starts here: http://us.php.net/manual/en/book.imap.php
Examples of opening a connection to an NNTP server can be found in the imap_open topic.
Like this:
OR
Then you can just request the info that you want:
That's not exactly what you'd asked for, but I hope it helps.
也不是一个类,也不是 OOP,也不是 PHP 5 特定的,http://news.php 后面的代码。 net 可以在这里找到:
php-news 来源
Also not a class, and also not OOP, and also not PHP 5 specific, the code behind http://news.php.net is available here:
php-news sources
我一直在用这个。 http://pear.php.net/manual/en /package.networking.net-nntp.client.php
看起来效果很好。 我正在使用 PHP 5.3 和 5.4
I have been using this. http://pear.php.net/manual/en/package.networking.net-nntp.client.php
It seems to work very well. I am using Php 5.3 and 5.4
在这个问题上也有点自我推销。 我是 php-nntp 的维护者(https://github.com/RobinvdVleuten/php-nntp )并尝试比旧的 PEAR 包(http://pear. php.net/package/Net_NNTP/),许多 NZB 网站仍在使用它。
To be also a bit self-promoting on this question. I am the maintainer php-nntp (https://github.com/RobinvdVleuten/php-nntp) and tried to be more OOP and future-proof compared to the old PEAR package (http://pear.php.net/package/Net_NNTP/) which is still used in many NZB sites out there.
我知道这个问题很久以前就被问过,但我的回答可以帮助其他人。
我一直在寻找好的 PHP 类来访问 NNTP。 然而,它们中的大多数都是基于某些较低版本的 PHP 构建的。
我能找到的唯一一个完全支持最新 PHP 版本的程序是由 Usenet 提供商(我作为首席开发人员)开发的。
您可以在这里找到它: https://www.usenetxl.nl/dev/
有相当多的文档。 课程本身也有文档。
I know this question was asked a long time ago, but my answer could help others out.
I've been searching for good PHP Classes to access NNTP. Most of them, however, are built on some lower versions of PHP.
The only one I could find that fully supports the most recent PHP version was developed by a Usenet provider (with me as Lead Developer).
You can find it here: https://www.usenetxl.nl/dev/
There is quite some documentation. There is also documentation in the classes themselves.