You are here: Re: Newsgroup Problem « All PHP « IT news, forums, messages
Re: Newsgroup Problem

Posted by Rik on 07/24/07 14:52

On Tue, 24 Jul 2007 16:41:05 +0200, The Newfoundland Shopper =

<admin@nlshopper.ca> wrote:

> Ok the below code connects to the newsgroup server so how do I change =
it =

> to
> post to a newsgroup?
>
> Thanks
> Tim
>
>
> $cfgServer =3D "news.aliant.net";
> $cfgPort =3D 119;
> $cfgTimeOut =3D 10;
>
> // open a socket
> if(!$cfgTimeOut)
> // without timeout
> $usenet_handle =3D fsockopen($cfgServer, $cfgPort);
> else
> // with timeout
> $usenet_handle =3D fsockopen($cfgServer, $cfgPort, &$errno, &$errs=
tr,
> $cfgTimeOut);
>
> if(!$usenet_handle) {
> echo "Connexion failed\n";
> exit();
> }
> else {
> echo "Connected\n";
> $tmp =3D fgets($usenet_handle, 1024);
> }


http://www.faqs.org/docs/linux_network/x-087-2-nntp.protocol.html
-> 22.1.6. Posting an Article

Pretty much the same kind of header/body format as email, just examine a=
=

normal usenet posting for the headers you think you need. Be sure to use=
=

alt.test or similar when testing offcourse, or people might be pissed of=
f =

:P

-- =

Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация