Reverse file searching logic
This commit is contained in:
parent
e9c966061a
commit
cb7955c3be
1 changed files with 5 additions and 8 deletions
11
index.php
11
index.php
|
|
@ -37,17 +37,14 @@ if (!empty($_GET['url'])) {
|
||||||
|
|
||||||
$findfiles = glob($hashfilepath);
|
$findfiles = glob($hashfilepath);
|
||||||
|
|
||||||
if (empty($findfiles)) {
|
if (!empty($findfiles)) {
|
||||||
$content = 'No files.';
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$fullfilepath = current($findfiles);
|
$fullfilepath = current($findfiles);
|
||||||
|
|
||||||
header('Location:'.file_get_contents($fullfilepath));
|
header('Location:'.file_get_contents($fullfilepath));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$content = 'No link match this identifier.';
|
||||||
} else {
|
} else {
|
||||||
$content = '<form method="get">
|
$content = '<form method="get">
|
||||||
Enter your URL: <input type="text" name="url"><input type="submit" value="Submit">
|
Enter your URL: <input type="text" name="url"><input type="submit" value="Submit">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue