문제

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