22 lines
427 B
PHP
22 lines
427 B
PHP
<?php
|
|
|
|
class Alarmer
|
|
{
|
|
static public function send($message)
|
|
{
|
|
if (App::getConfig('alarmerKey')) {
|
|
|
|
$ch = curl_init("https://alarmerbot.ru/");
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, array(
|
|
"key" => App::getConfig('alarmerKey'),
|
|
"message" => 'WIKIPOINTS: '.$message,
|
|
));
|
|
curl_exec($ch);
|
|
curl_close($ch);
|
|
}
|
|
}
|
|
}
|
|
|