php3-list | 199908
Date: 08/11/99
- Next message: Robert Aden: "[PHP3] Re: BASEN????"
- Previous message: Mark Jeftovic: "Re: [PHP3] looking for good web hosting co"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
If this is a nntp ( news ) server you're trying to connect to , ue imap
functions. It supports news.
// Robert
Citerar ¹ÚÁ¦¹ü <bjb <email protected>>:
> thanks for your response...
> but I could't solve the problem.
> my source
> ----------------------------------------------------------------------
> <?
> // news.kornet.net Á¢¼Ó
> $getline="";
> $handle = fsockopen("news.kornet.net",119);
> $getline = fgets($handle, 1024);
> $code = explode(" ",$getline);
>
> if (strcmp($code[0], "200") ) {
> fputs($handle,"close\r\n");
> fclose($handle);
> return "kornet"; // ºñÁ¤»ó½Ã
> }
>
> // news group Á¢¼Ó
> $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; // ºñÁ¤»ó Á¢¼Ó
> }
>
> fputs($handle,"article\r\n");
> $getline = fgets($handle, 1024);
> $code = explode(" ",$getline);
>
> if( strcmp($code[0], "220") ) { // strcmp : °°À¸¸é 0À» return
> fputs($handle,"close\r\n");
> fclose($handle);
> return article; // 220(¼º°ø) code°¡ ¾Æ´Ï¸é return 0
> }
>
> for($a=0; $a<30; $a++) {
> $getline = fgetss($handle,
1024);
> // I guess this part may have some problems...
> $getline = htmlspecialchars
($getline);
> // this function, htmlspecialchars() is not solusion...
> // $getline = htmlentities
($getline);
> //
> echo("<br>"); echo($getline); echo strlen($getline); echo
("<br>"); //
> so.I tried to use the function,strlen()
>
> // in order to check the fgetss function..
> }
>
> 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...
>
>
> -----¿øº» ¸Þ½ÃÁö-----
> º¸³½ »ç¶÷: Robert Aden <robert <email protected>>
> ¹Þ´Â »ç¶÷: bjb <email protected> <bjb <email protected>>
> ³¯Â¥: 1999³â 8¿ù 9ÀÏ ¿ù¿äÀÏ ¿ÀÈÄ 5:38
> Á¦¸ñ: Re: [PHP-DEV] Bug #2001: I can't read news header message.
>
>
> >
> >Citerar bjb <email protected>:
> >
> >> From: bjb <email protected>
> >> Operating system: redhat linux 5.2
> >> PHP version: 3.0.11
> >> PHP Bug Type: Other
> >> Bug description: I can't read news header message.
> >>
> >> I'm makeing the 'usenet client for web'(viewer).
> >>
> >> First following is my source.
> >> ---------------------------------------------------
> >> // news header
> >> Message-ID: <slrn7b1dk1.6kg.artsilly <email protected>>
> >> References: <slrn7ar9sp.31n.artsilly <email protected>>
> >> // my source
> >> $getline = fgets($handle,1024);
> >> echo($getline);
> >> ----------------------------------------------------
> >> but result is
> >> Message-ID:
> >> References:
> >> -----------------------------------------------------
> >> I want
> >> Message-ID: <slrn7b1dk1.6kg.artsilly <email protected>>
> >> References: <slrn7ar9sp.31n.artsilly <email protected>>
> >> -----------------------------------------------------
> >> Why I can't read message headers...
> >>
> >I think your problem is the "<" in $getline , when a browser displays
> >that it will not show anything until after the ">" .... look at the
raw
> >source to cinfirm.
> >Use
> >$getline = htmlspecialchars($getline);
> >to convert them to < and >
> >
> >// Robert
> >
> >> I can't English very well.
> >> Sorry. thanks.
> >>
> >>
> >> --
> >> PHP Development Mailing List <http://www.php.net/>
> >> To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
> >> For additional commands, e-mail: php-dev-help <email protected>
> >> To contact the list administrators, e-mail:
> >php-list-admin <email protected>
> >>
> >>
> >
> >
> >
> >There are 3 kinds of people in this world:
> >those who can count and those who can't.
> >
>
There are 3 kinds of people in this world:
those who can count and those who can't.
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Robert Aden: "[PHP3] Re: BASEN????"
- Previous message: Mark Jeftovic: "Re: [PHP3] looking for good web hosting co"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

