💻 Slide Installare Apache
📚Risorse
🛠️Codice javascript per visualizzare l'indirizzo ip del client browser
<!DOCTYPE html>
<html>
<head>
<title>Visualizza IP Address</title>
</head>
<body>
<h1>Il tuo indirizzo IP:</h1>
<p id="ip-address">Sto cercando il tuo indirizzo IP...</p>
<script type="text/javascript">
// Funzione per ottenere l'indirizzo IP del client
function getIpAddress() {
fetch("https://api.ipify.org?format=json")
.then(response => response.json())
.then(data => {
const ipAddress = data.ip;
document.getElementById("ip-address").textContent = "Il tuo indirizzo IP è: " + ipAddress;
})
.catch(error => {
document.getElementById("ip-address").textContent = "Impossibile ottenere l'indirizzo IP.";
});
}
// Chiama la funzione per ottenere l'indirizzo IP quando la pagina si carica
getIpAddress();
</script>
</body>
</html>