在php中使用sockets:从新闻组中获取文章(2)

//check error

          if($tmp != "281 Okrn") {
              echo "502 Authentication errorn";
              exit();
          }
  }

  //select newsgroup

  fput($usenet_handle, "GROUP ".$cfgNewsGroup."n");
  $tmp = fgets($usenet_handle, 1024);

  if($tmp == "480 Authentication required for commandrn") {
     echo $tmp;
     exit();
  }

  $info = split(" ", $tmp);
  $first= $info[2];
  $last = $info[3];

  printf("First : %sn", $first);
  printf("Last : %lastn", $last);

?>

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/97553097e6ef5e319e52dcd825430e6d.html