fsockopen() problems, please help
Posted: Thu Feb 19, 2004 12:49 pm
Hi, I wanted to connect to some usenet servers. So I did this:
$ns = fsockopen("news-read2.maxwell.syr.edu", 119, $errno, $errstr);
fputs($ns,"list \r\n");
...
fclose($ns);
but I keep getting this>
Warning: fsockopen(): unable to connect to news-read2.maxwell.syr.edu:119 in /usenet.php on line 93
Warning: fputs(): supplied argument is not a valid stream resource in /usenet.php on line 106
Warning: fclose(): supplied argument is not a valid stream resource in /usenet.php on line 143
the unable to connect is weird, I am trying to connect to a working usenet news server. The one that is used in this script can be easily used in a newsreader software [like outlook express] without errors (download list of newsgroups for example)
what's wrong?
$ns = fsockopen("news-read2.maxwell.syr.edu", 119, $errno, $errstr);
fputs($ns,"list \r\n");
...
fclose($ns);
but I keep getting this>
Warning: fsockopen(): unable to connect to news-read2.maxwell.syr.edu:119 in /usenet.php on line 93
Warning: fputs(): supplied argument is not a valid stream resource in /usenet.php on line 106
Warning: fclose(): supplied argument is not a valid stream resource in /usenet.php on line 143
the unable to connect is weird, I am trying to connect to a working usenet news server. The one that is used in this script can be easily used in a newsreader software [like outlook express] without errors (download list of newsgroups for example)
what's wrong?