diff --git a/include.php b/include.php
index d2350bf..7943914 100644
--- a/include.php
+++ b/include.php
@@ -1,6 +1,10 @@
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=0');
+ $this->PlayCount = $this->Parser->splits($data, 'Play Count: ', '');
+ return $this->PlayCount;
+ }
+ }
diff --git a/include/db.php b/include/db.php
index b25cf5b..188d659 100644
--- a/include/db.php
+++ b/include/db.php
@@ -19,4 +19,4 @@
{
// ...
}
- }
\ No newline at end of file
+ }
diff --git a/include/index.php b/include/index.php
new file mode 100644
index 0000000..68300b8
--- /dev/null
+++ b/include/index.php
@@ -0,0 +1 @@
+It works!
diff --git a/include/webparser.php b/include/webparser.php
index c8899a9..b3575ab 100644
--- a/include/webparser.php
+++ b/include/webparser.php
@@ -34,7 +34,7 @@
$data = curl_exec($ch);
curl_close($ch);
if ($curl_errno > 0)
- return 0;
+ $this->ErrorEcho(14, 'Connect Error!!!');
return ($data) ? $data : false;
}
- }
\ No newline at end of file
+ }
diff --git a/test.php b/test.php
new file mode 100644
index 0000000..70e73f0
--- /dev/null
+++ b/test.php
@@ -0,0 +1,5 @@
+CheckUser('Angelsim');
+ echo '
';
+ echo $Check->CheckPlayCount();