PHP
PHP request method
get
https://neko-love.xyz
/api/v1/:endpoint
1
<?php
2
3
nekoGET("neko");
4
5
function nekoGET($type) {
6
$url = 'https://neko-love.xyz/api/v1/'.$type;
7
$body = file_get_contents($url);
8
if ($body == false) echo 'An error has occurred';
9
else {
10
$obj = json_decode($body);
11
echo $obj->{'url'};
12
}
13
}
14
?>
Copied!
Last modified 1yr ago
Copy link