![]() |
|
Ricavere IP e Hostname con Php
Con Php è possibile ricavare l'indirizzo IP da un Hostname e viceversa.
<?PHP
$from = $HTTP_GET_VARS["f"];
$query = $HTTP_GET_VARS["q"];
if ($query != "")
{
if ($from == "IP")
{
$host = gethostbyaddr($query);
echo "L'hostname di <em>".$query."</em> è <strong>".$host."</strong>.";
}
else if ($from == "Host")
{
$ip = gethostbyname($query);
echo "L'indirizzo IP di <em>".$query."</em> è <strong>".$ip."</strong>.";
}
else
{
exit("Errore!");
}
}
else
{
exit("Errore!");
}
?>
|
IN EVIDENZA
Effetto ombra su testo con Photoshop
Guadagna col tuo sito grazie a TradeD...
Guida XHTML
Riscrivere le URL con Asp
Riavviare IIS
HTTP 500 internal server error
Generare password casuali in Javascri...
Errore 80004005: Cannot update. Datab...
Introduzione ad Ajax ed Asp con Jscri...
Referenze dei Tag Html
Stringhe di connessione via ODBC e Ol...
Referenze dei fogli di stile Css
Le espressioni regolari in Javascript
|
||||
© 2001/2010 lukeonweb.net - A cura di Luca Ruggiero, Partita IVA 05564851219 -
Privacy |
Pubblicità |
Contatti
| |||||