<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

    protected void Page_Load(object sender, EventArgs e)
    {

        System.Net.Sockets.TcpClient client = new System.Net.Sockets.TcpClient();

        // Note: You can find a large list of Telnet accessible 
        // BBS systems at   

        // The WCS Online BBS (http://bbs.wcssoft.com)
        System.Net.IPAddress addr = System.Net.IPAddress.Parse("65.182.235.21");  
        System.Net.IPEndPoint endpoint = new System.Net.IPEndPoint(addr,23);

        client.Connect(endpoint);
        System.Net.Sockets.NetworkStream ns = client.GetStream();

        if (ns.DataAvailable)
        {
            byte[] bytes = new byte[client.ReceiveBufferSize];
            ns.Read(bytes, 0, client.ReceiveBufferSize);
            string data = System.Text.Encoding.ASCII.GetString(bytes);
        }
        ns.Close();
    }
</script>