Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function __construct($id, $auth) {
- $this->location = "http://5.178.83.92/".$this->authID."/".$this->authKey."/";
- }
- function getCurl($url) {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $this->location.$url);
- curl_setopt($ch, CURLOPT_PROXY, $this->proxy);
- curl_setopt($ch, CURLOPT_HEADER, false);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
- $query = curl_exec($ch);
- if($query === false) {
- $this->addLog('curl', curl_error($ch));
- return $this->sendError(curl_error($ch));
- } else return $query;
- curl_close($ch);
- }
- function bossInfo() {
- $url = json_decode($this->getCurl($this->location.'get_boss?ts='.time()), true);
- $bossInfo['FinishTime'] = $url['finish_time'];
- $bossInfo['BossHP'] = $url['boss_health'];
- return $bossInfo;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement