Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2011
    Messaggi
    37

    verifica sito raggiungibile

    Salve a tutti, devo verificare che un sito sulla mia WAN sia effettivamente raggiungibile ho trovato questo script ma mi riporta il sito sempre online anche metto un ip inesistente:
    codice:
     function getIPStatus($ip, $port)
    {
    	if ($check=@fsockopen($ip, $port, $errno, $errstr, 2))
    	{
    		fclose($check);
    		return "online";
    	} else {
    		return "offline";
    	}
    }
    
    echo "L'IP è: " . getIPStatus("192.168.1.10", 80);
    qualche idea su come fare?

  2. #2

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.