Üye Kayıt Üye Giriş

Asp.NET İle Domain Sorgulama


 Asp.NET İle Domain Sorgulama


<% @Page Language="C#" Debug="false"%>
<% @Import Namespace="System.Net.Sockets" %>
<% @Import Namespace="System.Text" %>
<% @Import Namespace="System.IO" %>
<% @Import Namespace="System.Text.RegularExpressions" %>

<script language="C#" runat=server>
<!-- Java Script Kontrolleri Burda Başlar Gibi Yapar.. -->
public void btn_Click(object sender, EventArgs eArgs)
{
try
{
TcpClient objTCPC = new TcpClient(Request.Form["WhoisServer"], 43);
string strDomain = Request.Form["DomainName"] + "\r\n";
byte[] arrDomain = Encoding.ASCII.GetBytes(strDomain);

Stream objStream = objTCPC.GetStream();
objStream.Write(arrDomain, 0, strDomain.Length);
StreamReader objSR = new StreamReader(objTCPC.GetStream(),
Encoding.ASCII);
lblResponse.Text = "<b>" + Request.Form["DomainName"] +
"</b><br><br>" + Regex.Replace(objSR.ReadToEnd(),"\n","<br>");

objTCPC.Close();
}
catch(Exception ex)
{
lblResponse.Text = ex.ToString();
}
}
<!-- Java Script Kontrolleri Burda Biter The Finish ;] -->
</script>


<html>
<head>
<style>
.main {font-family:Verdana; font-size:12px;}
.title {font-family:Verdana; font-size:18px; font-weight:bold;}
</style>
</head>
<body>
<span class="title" align="center">RawKSoft Whois Server V1.0.0r Beta</span>

<form method="POST" name="MainForm" runat="server">
<table>
<tr>
<td class="main" align="right">Whois Çekelim ;] Yanılma Payı Yoktur birden fazla site ile irtabat kurar...</td>
<td class="main">
<asp:DropDownList class="main" id="WhoisServer" runat="server">
<asp:ListItem value="whois.networksolutions.com">
</asp:ListItem>
<asp:ListItem value="whois.ripe.net"></asp:ListItem>
<asp:ListItem value="whois.cira.ca">
</asp:ListItem>
<asp:ListItem value="whois.nic.uk"></asp:ListItem>
<asp:ListItem value="whois.domain-registry.nl">
</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="main" align="right">Hangi Site:</td>
<td class="main"><input type="text" class="main"
name="DomainName" value=""></td>
</tr>
<tr>
<td class="main"> </td>
<td class="main"><input type="Submit" id="btnSubmit"
OnServerClick="btn_Click" value="Araştır !" runat="server" /></td>
</tr>
</table>
<br><br>
<asp:Label class="main" id="lblResponse" runat="server"/>
</form>
<font size="1">Mysterious by Rawkmetal © 2005</font>
</body>
</html>

Bilgisayar Dershanesi Ders Sahibi;
Bilgisayar Dershanesi

Yorumlar

Yorum Yapabilmek İçin Üye Girişi Yapmanız Gerekmektedir.

ETİKETLER