public function getGroupXml($page = 1) { if ($this->xml == null) { $url = self::BASE_URL . $this->gid . '/memberslistxml/?xml=1&p=' . $page; $response = Helper::cURL($url); $this->xml = new \SimpleXMLElement($response); } return $this->xml; }
public function getProfileXml() { if ($this->profile == null) { $url = self::BASE_URL . $this->steamId . '/?xml=1'; $xml = Helper::cURL($url); $this->profile = new \SimpleXMLElement($xml); } return $this->profile; }
public static function GetTimeDifference() { try { $response = Helper::cURL('http://api.steampowered.com/ITwoFactorService/QueryTime/v0001', null, ['steamid' => 0]); $json = json_decode($response, true); if (isset($json['response']) && isset($json['response']['server_time'])) { return (int) $json['response']['server_time'] - time(); } } catch (\Exception $ex) { } return 0; }