diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..600d2d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode \ No newline at end of file diff --git a/include/check.php b/class/osutournament/check.php similarity index 90% rename from include/check.php rename to class/osutournament/check.php index 3b29332..65b2be7 100644 --- a/include/check.php +++ b/class/osutournament/check.php @@ -1,6 +1,6 @@ Parser = new Parser(); + $this->Parser = new WEBParser(); } /** * SelectMode osu! mode @@ -98,11 +105,12 @@ } /** * CheckUser Check user data - * @param string $osuid Input osu! ID - * @param int, string $mode Input osu! mode - * @param string $server Input osu! server (osu/ripple) + * @param string $osuid Input osu! ID + * @param int, string $mode Input osu! mode + * @param string $server Input osu! server (osu/ripple) + * @param string $serverurl Input ripple server custom URL */ - public function CheckUser($osuid, $mode, $server='osu') + public function CheckUser($osuid, $mode, $server='osu', $serverurl='https://ripple.moe') { $this->ResetObject(); $this->SelectMode($mode); @@ -118,8 +126,9 @@ break; case 'ripple': case 2: + $this->serverurl = $serverurl; $this->server = 'ripple'; - $this->data_profile = $this->Parser->WEBParsing('https://ripple.moe/u/' . $osuid); + $this->data_profile = $this->Parser->WEBParsing($serverurl.'/u/' . $osuid); $this->OsuID = $this->Parser->splits($this->data_profile, 'window.userID = \'', '\';'); $this->RealID = $this->Parser->splits($this->data_profile, '