2021-12-31 23:09:58 +01:00
|
|
|
<?php
|
2022-01-02 13:47:41 +01:00
|
|
|
class notificationFreemobile
|
|
|
|
{
|
|
|
|
private $url = "https://smsapi.free-mobile.fr/sendmsg?user=32886706&pass=JTGUY6l5OG73zX&msg=";
|
|
|
|
private $name = "freemobile";
|
|
|
|
|
|
|
|
function __construct()
|
|
|
|
{
|
|
|
|
global $notificationMethods;
|
|
|
|
$notificationMethods[$name]->active = true;
|
|
|
|
$notificationMethods[$name]->level = ALL;
|
|
|
|
}
|
|
|
|
|
|
|
|
function send($message)
|
|
|
|
{
|
|
|
|
if ($this->active == true)
|
|
|
|
{
|
|
|
|
$ch = curl_init();
|
|
|
|
// set url
|
|
|
|
curl_setopt($ch, CURLOPT_URL, $this->url . $message);
|
|
|
|
|
|
|
|
//return the transfer as a string
|
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
|
|
|
|
|
|
// $output contains the output string
|
|
|
|
logger(INFO, curl_exec($ch));
|
|
|
|
|
|
|
|
// close curl resource to free up system resources
|
|
|
|
curl_close($ch);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$notificationMethods["freemobile"] = new notificationMethod();
|
|
|
|
|
|
|
|
?>
|