mirror of
https://github.com/hakasenyang/osu-tournament-php
synced 2026-08-22 03:03:07 +09:00
커스텀 Ripple 서버 지원
제한 사항 : Ripple 서버의 Frontend 소스(데이터)가 같아야 값을 제대로 가져옵니다. 아직 해당 소스에 대한 검증은 제작하지 않았습니다.
This commit is contained in:
+12
-3
@@ -41,10 +41,17 @@
|
||||
* 1 or ripple = Ripple Server
|
||||
* other = return false
|
||||
*
|
||||
* using data : only use osu or ripple (string)
|
||||
* using data : use only osu or ripple (string)
|
||||
* @var int, string
|
||||
*/
|
||||
public $server;
|
||||
/**
|
||||
* $serverurl osu! ripple server custom URL
|
||||
* Default URL : https://ripple.moe
|
||||
* use only $server = 1 (ripple)
|
||||
* @var string
|
||||
*/
|
||||
private $serverurl;
|
||||
/**
|
||||
* Temp data
|
||||
* $data_profile Temp data
|
||||
@@ -101,8 +108,9 @@
|
||||
* @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, '<title>', ''s profile - Ripple');
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user