In the code below I can get a list of "message-id"s in a group I selected earlier. Now with that info I can retreive the header with

head "message-ID"

how do I find out what the size of the article is? Like what php imap does with imap_fetch_overview(); It goes without saying that I do not want to download the whole body. Just want the file size.

fputs($usenet_handle, "newnews ".$cfgNewsGroup." 111126 000000\n");
        while ($buffer != ".\r\n") {
            $buffer = fgets($usenet_handle, 1024);
            if ($buffer != ".\r\n") {
                echo $buffer;
            }
        }
有帮助吗?

解决方案

NNTP servers generally don't store the article size in the headers. That makes it impossible to know what size it is by just looking at the header.

However, as you're talking about file sizes, I guess you're doing something with NZB files. If you'd like to know the size of an NZB collection, just download the NZB and calculate it from there.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top