php class isp function __construct ip admin pass type_object авторизац

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
<?php
class isp {
function __construct($ip, $admin, $pass, $type_object){
// авторизация
$url = "https://".$ip.":1500/manager?out=".$type_object."&func=auth&username=".$admin."&password=".$pass;
$auth = json_decode(file_get_contents($url), true);
echo $auth;
}
}
?>