-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
75 lines (70 loc) · 2.94 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE HTML>
<html>
<head>
<title>MAL User2ID</title>
<link rel="stylesheet" href="style.css" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="description" content="MAL-Stalker">
<meta name="keywords" content="MAL, MyAnimeList, Username, ID, User-ID">
<meta property="og:title" content="MAL-Stalker">
<meta property="og:description" content="Tool to convert usernames to IDs and track username changes on MyAnimeList.net">
<meta property="og:image" content="/favicon.png" />
<meta name="twitter:card" content="summary">
</head>
<body bgcolor="hotpink">
<center>
<h1 style="margin-bottom: 1pt;">MAL User2ID<sup><a href="about.htm">?</a></sup></h1>
<p style="margin-top: 0pt; font-size: 120%; margin-bottom: 2em;"><i>(essentially MAL-Stalker)</i></p>
<div class="centerdiv">
<form action="index.php" method="POST" class="gridof2">
<input type="text" id="id" name="id" placeholder="ID">
<button type="submit" name="getUser" value="clicked">get username</button>
</form>
<form action="index.php" method="POST" class="gridof2">
<input type="text" id="username" name="username" placeholder="Username">
<button type="submit" name="getID" value="clicked">get ID</button>
</form>
<p id="down">
<?php
require "curl.php";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (isset($_POST["getID"])) {
echo "</p><p>";
getID($_POST["username"], true);
} else if (isset($_POST['getUser'])) {
$id = $_POST["id"];
getUser($id, true);
}
}
?>
</p>
</div>
<form action="index.php" method="POST">
<label>Get IDs of users who were seen with the username:</label>
<br/>
<input type="text" id="username" name="username" placeholder="Username">
<button type="submit" name="dig" value="clicked">Get IDs</button>
</form>
<p><?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if(isset($_POST["dig"])){
$username = $_POST["username"];
if(empty($username)){
echo "You did not specify a username.";
}
else{
$rec = dig_records($username);
if($rec == null){
print("No records.");
}
else{
print_r($rec);
}
}
}
}
?>
</p>
</center>
</body>
</html>