Wake on lan script that works

后端 未结 4 1906
抹茶落季
抹茶落季 2021-01-31 12:17

is there a wake on lan script using a web language preferably php that works? Also one that has some documentation on how to get it to work like what needs to be enabled on your

4条回答
  •  长发绾君心
    2021-01-31 12:55

    HTML (test.htm)

    
    Click to WOL XX:XX:XX:XX:XX:XX
    
    

    PHP (test.php)

    =0){    
            $e = socket_sendto($sock, $packet, strlen($packet), 0, $broadcast, 7);
            socket_close($sock);
            }    
        }
    }  //end function wol
    ?>
    

    Since the split() function was removed from PHP 7.0.0, this script uses preg_split() to be compatible with current and previous PHP versions.

    Replace XX:XX:XX:XX:XX:XX in the HTML with your target MAC to test the script.

提交回复
热议问题