This script crashes for me, but it work if comment out the line 17 (the
var_dump).


Tomas V.V.Cox
<?php
require_once 'PEAR.php';

class Net_Nntp extends PEAR
{
    function connect($nntpserver, $port = 119)
    {
        $fp = @fsockopen($nntpserver, $port, $errno, $errstr, 15);
        socket_set_blocking($fp, true);
        $response = fgets($fp, 128);
        $this->fp = $fp;
    }

    function prepare_connection($nntpserver, $port = 119, $newsgroup)
    {
        $err = $this->connect($nntpserver, $port);
        //var_dump($err);
        $this->command("GROUP $newsgroup");
    }

    function command($cmd, $testauth = true)
    {
        fputs($this->fp, "$cmd\r\n");
    }
}
$news = new Net_NNTP;
$news->prepare_connection('news.php.net', 119, 'php.pear.dev');
echo "works\n";
?>
-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to