mode = 0; break; case 1: case 'taiko': $this->mode = 1; break; case 2: case 'ctb': $this->mode = 2; break; case 3: case 'mania': $this->mode = 3; break; default: throw new Exception('Error Mode'); break; } $this->Parser = new Parser(); } public function CheckUser($osuid) { // Transfer osu! ID to Num $data = $this->Parser->WEBParsing('https://osu.ppy.sh/u/'.$osuid); $this->OsuID = $this->Parser->splits($data, 'var userId = ', ';'); if(!isset($this->OsuID)) return 0; return $this->OsuID; } public function CheckPlayCount() { $data = $this->Parser->WEBParsing('https://osu.ppy.sh/pages/include/profile-general.php?u=' . $this->OsuID .'&m=' . $this->mode); $this->PlayCount = $this->Parser->splits($data, 'Play Count: ', ''); return $this->PlayCount; } }