1
0

some debbuging

This commit is contained in:
2022-01-02 18:14:13 +01:00
parent 2e6b2fe5cb
commit d79463fbd4
11 changed files with 147 additions and 242 deletions

View File

@@ -68,41 +68,4 @@ class interval
public $endDate;
}
class notificationMethod
{
public $url;
public $msg;
public $active;
public $level;
function __construct($url)
{
$this->url = $url;
}
public function send($text=null)
{
if (empty($text)) $text= $this->msg;
if (!empty($msg))
{
$opts = array(
'http'=>array(
'method'=>"GET",
'header'=>"Accept-language: fr\r\n"
)
);
$context = stream_context_create($opts);
/* Envoi une requête HTTP vers $url
avec les en-têtes additionnels ci-dessus */
$fp = fopen($url . "/" . $msg, 'r', false, $context);
$response = stream_get_contents($fp, -1, 0);
fclose($fp);
}else
{
// TODO log_error("notificationMethod : $msg is null");
}
}
}
?>