Permalink
Browse files

Merge pull request #198 from tarasfrompir/patch-1

Update ssdp_devices_scan.inc.php
  • Loading branch information...
T-REX-XP committed Jul 10, 2018
2 parents fe1a97c + 3de3c56 commit 66ccbde8c269633f3182d9a1f3cdc5e9089476f2
Showing with 1 addition and 8 deletions.
  1. +1 −8 modules/ssdp_finder/ssdp_devices_scan.inc.php
@@ -78,7 +78,7 @@ function Scan(){
"MODELNUMBER" => $device["modelNumber"],//modelNumber
"MANUFACTURER" => $device["manufacturer"],//Manufacturer
"SERVICES"=> getServices($device),//list services of device
"CONTROLADDRESS"=> editLocalIp($control_url),//list services of device
"CONTROLADDRESS"=> $control_url,//list services of device
];
$_SESSION[$uuid] = $logo;
session_write_close();
@@ -121,13 +121,6 @@ function getLocalIp() {
return gethostbyname(trim(`hostname`));
}
// функция заменяет 127.0.0.1 на реальный IP адрес для локального компа
function editLocalIp($baseUrl){
$localIp=getLocalIp();
$baseUrl = str_ireplace('127.0.0.1', $localIp, $baseUrl);
return $baseUrl;
}
function startsWith($haystack, $needle){
$length = strlen($needle);

0 comments on commit 66ccbde

Please sign in to comment.