Visualizzazione dei risultati da 1 a 2 su 2

Discussione: whois

  1. #1
    Utente di HTML.it
    Registrato dal
    Mar 2004
    Messaggi
    654

    whois

    Salve a tutti,

    ho trovato sul forum uno script in aspx per verificare la disponibilità di un dominio con relative eventuali info (whois).

    Questo è lo script:

    <%@ Page Language="VB" %>
    <%@ Import Namespace = "System.Net.Sockets"%>
    <%@ Import Namespace = "System.Text" %>
    <%@ Import Namespace = "System.IO" %>
    <script runat="server">
    ' Autore: Luca Ruggiero http://www.lukeonweb.net
    ' Fonte: http://www.mrwebmaster.it
    Private Sub WHOIS (sender As object, e As EventArgs)


    Try
    Dim TCP As TcpClient
    TCP = New TcpClient(estensione.SelectedItem.Value, 43)
    Dim dominio As String
    dominio = nome.Text & estensione.SelectedItem.Text & vbCrLf
    Dim arr_dom As Array = Encoding.ASCII.GetBytes(dominio)
    Dim stream As Stream = TCP.GetStream()
    stream.Write(arr_dom, 0, dominio.Length)
    Dim leggi As StreamReader
    leggi = New StreamReader(TCP.GetStream(), Encoding.ASCII)
    info.Text = ""
    info.Text += "<pre>"
    info.Text += Regex.Replace(leggi.ReadToEnd(), vbCrLf, "
    ")
    info.Text += "</pre>"
    TCP.Close()
    Catch ex As OverflowException
    info.Text = ex.ToString()
    End Try


    End Sub
    </script>
    <html>
    <head>
    <title>WHOIS</title>
    <link href="/css/stile.css" rel="stylesheet" type="text/css">

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>

    <h1>WHOIS</h1>

    <form runat="server">
    http://www.
    <asp:TextBox id="nome" runat="server"/>
    <aspropDownList id="estensione" runat="server">
    <asp:ListItem value="whois.nic.it">.it</asp:ListItem>
    <asp:ListItem value="whois.internic.net">.com</asp:ListItem>
    <asp:ListItem value="whois.crsnic.net">.net</asp:ListItem>
    <asp:ListItem value="whois.pir.org">.org</asp:ListItem>
    </aspropDownList>


    <asp:Button text="WHOIS" onClick="WHOIS" runat="server" />



    <asp:Label id="info" text="" runat="server" />
    </form>



    </body>
    </html>



    Premetto che non conosco aspx , ma solamente asp.
    In che maniera potrei verificare solamente se il dominio è registrato oppure no ??? Come posso leggere solo questo dato e poi eventualmente solo in un secondo step leggere tutti i dati relativi al dominio .... ?

  2. #2
    Utente di HTML.it
    Registrato dal
    Mar 2004
    Messaggi
    654
    niente da fare ?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.