-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathlib.php
More file actions
25 lines (20 loc) · 569 Bytes
/
lib.php
File metadata and controls
25 lines (20 loc) · 569 Bytes
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
<?php
class urlmskr {
public static function encode($text) {
return base64_encode($text);
}
public static function decode($text) {
return base64_decode($text);
}
public static function mask($text, $type) {
if ($type == 'text') {
return "https://axorax.github.io/urlmskr/?t=" . self::encode($text);
} else {
return "https://axorax.github.io/urlmskr/" . self::encode($text);
}
}
}
// Usage examples:
// urlmskr::mask('urlmskr', 'text');
// urlmskr::mask('urlmskr', 'other');
?>