I have script for getting header of article from NNTP server using sockets:

<?
$conn = fsockopen("csnews.vslib.cz", 119);
fputs($conn, "GROUP cz.comp.lang.php\r\n");
fputs($conn, "HEAD 3600\r\n");
while ($result = fgets($conn, 2048)) {
 if (substr($result, 0, 1) == ".") break;
 echo $result."<br>";
}
?>

output have look so:

...
Path: csnews.vslib.cz!not-for-mail
From: "Antonin Mohaupt" <[EMAIL PROTECTED]>
Newsgroups: cz.comp.lang.php
...

but it is only

...
Path: csnews.vslib.cz!not-for-mail
From: "Antonin Mohaupt"
Newsgroups: cz.comp.lang.php
...

What's the problem ? I tried higher raise length of data (second argument of
fgets()), but with no result.
When I am doing it by telnet, all is ok. What to do ?

Luboslav Gabal


-- 
PHP General 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