Skip to content
Permalink
Browse files

Update magichome.class.php

  • Loading branch information...
directman66 committed Sep 7, 2018
1 parent aef157b commit cc10092c16e1cb7b858280ddef334c7682bf5d0d
Showing with 5 additions and 3 deletions.
  1. +5 −3 modules/magichome/magichome.class.php
@@ -141,7 +141,7 @@ function admin(&$out) {
if ($this->view_mode=='scan') {
$this->search();
$this->scan();
// $this->search_devices($out);
}
@@ -301,7 +301,7 @@ function checkSettings() {
//////////////////////////////////////////////
//////////////////////////////////////////////
//////////////////////////////////////////////
function search() {
function scan() {
$ip = "255.255.255.255";
$port = 48899;
@@ -313,6 +313,7 @@ function search() {
socket_set_option($sock, SOL_SOCKET, SO_BROADCAST, 1);
socket_sendto($sock, $str, strlen($str), 0, $ip, $port);
socket_recvfrom($sock, $buf,100 , 0, $ip, $port);
usleep(100);
socket_close($sock);
// $buf = null;
@@ -325,7 +326,8 @@ function search() {
// echo("Data sent was: time\nResponse was:" . $buffer . "\n");
//}
socket_close($socket);
//}

0 comments on commit cc10092

Please sign in to comment.
You can’t perform that action at this time.