Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Created by PhpStorm.
- * User: alex1rap
- * Date: 11.11.2016
- * Time: 23:29
- */
- class BegetCron
- {
- private $beget_url = "https://api.beget.ru/api/cron/";
- private $login;
- private $password;
- public function BegetCron($login, $password)
- {
- $this->login = $login;
- $this->password = $password;
- }
- public function use ($method, $parameters = [])
- {
- $parameters = http_build_query($parameters);
- $url = $this->beget_url . $method . "?login=" . $this->login . "&password=" . $this->password . "&output_format=json&$parameters";
- return json_decode(file_get_contents($url));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement