{
$temp = data_in();
switch (substr($temp, 0, 3))
{
case "LST":
$temp_array = explode(" ",$temp);
$un = substr($temp_array[1], 2);
$nn = substr($temp_array[2], 2);
$nn1 = substr($temp_array[2], 0, 1);
if($nn1 == "F")
{
echo "<a href="mailto:$un">$nn</a><br/>";
}
else
{
echo "曾经的好友: $un<br/>";
}
#echo $temp."<br/>";
break;
default:
# no nothing
break;
}
}
echo "列表结束";
@fclose($sbconn);
# end here
# functions
function data_out($data){
global $sbconn,$debug,$trid;
fputs($sbconn,$data."rn");
$trid++;
if ($debug && !empty($data)){ echo "> ".$data."<br>rn";}
}
function data_in(){
global $sbconn,$debug;
$temp = fgets($sbconn,256);
if ($debug && !empty($temp)){echo "< ".$temp."<br>rn";}
return $temp;
}
?>
</div>
</body>
</html>
有需要的朋友可以参考下,大约要延迟几秒。







