pear net_nntp

Do you have questions regarding Pecl or Pear? ask here!

Moderators: macek, egami, gesf

peewster
New php-forum User
New php-forum User
Posts: 11
Joined: Mon Oct 10, 2011 3:20 am

pear net_nntp

Postby peewster » Fri Jan 25, 2013 12:51 pm

Hi all,

just started with pear net_nntp. Followed the online documentation from pear, but i can't figure out my connection issues to a news server.

I followed:
http://pear.php.net/manual/en/package.networking.net-nntp.ancient.connectauthenticated.php

I used:

Code: Select all

require_once 'Net/NNTP.php';

boolean Net_NNTP::connectAuthenticated (
integer $user = <user>,
integer $pass = <pass>,
string $host = <news-server>,
integer $port = NET_NNTP_PROTOCOL_DEFAULT_PORT,
integer $authmode = NET_NNTP_AUTHORIGINAL )


The error i got:

PHP Parse error: syntax error, unexpected 'Net_NNTP' (T_STRING) in /data/http/connect.php on line 3

Any ideas of what i'm doing wrong ?

seandisanti
php-forum Fan User
php-forum Fan User
Posts: 838
Joined: Mon Oct 01, 2012 12:32 pm

Re: pear net_nntp

Postby seandisanti » Thu Feb 07, 2013 1:03 pm

i'd say throw some parentheses around your require_once() call. like...

Code: Select all

    require_once('Net/NNTP.php');

    boolean Net_NNTP::connectAuthenticated (
    integer $user = <user>,
    integer $pass = <pass>,
    string $host = <news-server>,
    integer $port = NET_NNTP_PROTOCOL_DEFAULT_PORT,
    integer $authmode = NET_NNTP_AUTHORIGINAL )


Return to “PEAR and PECL”

Who is online

Users browsing this forum: No registered users and 1 guest

cron