snuffler-web/api/index.php

21 lines
318 B
PHP
Raw Normal View History

2024-09-27 05:47:54 +03:00
<?php
$url = explode('/', $_SERVER['REQUEST_URI']);
while ($url[0] !== "api") {
array_shift($url);
}
array_shift($url);
$count = 0;
while (!empty($url[0])) {
switch ($url[0]) {
case 'asd':
echo "asdasd";
break;
default:
echo $url[0] . "\n";
}
$count += 1;
array_shift($url);
}
echo "\n" . $count;
?>