Bug #2029: Re: [PHP-DEV] Bug #2001: I can't read news header message.

From: Date: Wed, 11 Aug 1999 09:25:24 +0000
Subject: Bug #2029: Re: [PHP-DEV] Bug #2001: I can't read news header message.
Groups: php.dev 
Request: Send a blank email to php-dev+get-9742@lists.php.net to get a copy of this message
From: bjb@dosan.kangnam.ac.kr Operating system: Redhat Linux PHP version: 3.0.11 PHP Bug Type: Other Bug description: Re: [PHP-DEV] Bug #2001: I can't read news header message. thanks for your response... but I could't solve the problem. my source(test) ---------------------------------------------------------------------- <? // news2.kornet.net connect $getline=""; $handle = fsockopen("news2.kornet.net",119); $getline = fgets($handle, 1024); $code = explode(" ",$getline); if (strcmp($code[0], "200") ) { fputs($handle,"close\r\n"); fclose($handle); return "connect error( news server )"; // &#48708;&#51221;&#49345;&#49884; } // news group connect $newsgroup="han.comp.os.linux"; fputs($handle,"group $newsgroup\r\n"); $getline = fgets($handle,1024); $code = explode(" ",$getline); if (strcmp($code[0], "211") ) { fputs($handle,"close\r\n"); fclose($handle); return group; // connect error (group) } fputs($handle,"article\r\n"); $getline = fgets($handle, 1024); $code = explode(" ",$getline); if( strcmp($code[0], "220") ) { fputs($handle,"close\r\n"); fclose($handle); return article; } for($a=0; $a<30; $a++) { // I guess this part may have some problems... $getline = fgetss($handle, 1024); // this function, htmlspecialchars() is not solusion... $getline = htmlspecialchars($getline); echo("<br>"); // so.I tried to use the function,strlen() // echo strlen($getline); in order to check the fgetss // function.. echo($getline); echo ("<br>"); } fputs($handle,"close\r\n"); fclose($handle); ?> -------------------------------------------------------------------- result -------------------------------------------------------------------- ... Message-ID: 14 // fgetss function returns just 14... References: 14 // fgetss function returns just 14... ... -------------------------------------------------------------------- I think that the fgetss function is not suitable... Is there auy other function like imap_header()? I really need your help... so, please help me.... Break a leg...

« previous php.dev (#9742) next »