init 4chan
This commit is contained in:
commit
c850337f1e
390 changed files with 195936 additions and 0 deletions
25
rid.php
Normal file
25
rid.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
$names = @file("files.txt");
|
||||
|
||||
if (!$names) {
|
||||
$arr = scandir(".");
|
||||
|
||||
foreach ($arr as $fi) {
|
||||
if (preg_match("/\.(jpg|gif|png)$/", $fi)) {
|
||||
$names[] = $fi;
|
||||
}
|
||||
}
|
||||
|
||||
file_put_contents("files.txt", join($names, "\n"));
|
||||
}
|
||||
|
||||
$dir = dirname($_SERVER['REQUEST_URI']);
|
||||
$dir = str_replace("dontblockthis/", "", $dir);
|
||||
$dir = str_replace( '/image', '', $dir );
|
||||
|
||||
$protocol = $_SERVER['SERVER_PORT'] == 443 ? "https" : "http";
|
||||
|
||||
header("Location: ".$protocol."://s.4cdn.org/image" . $dir ."/" . $names[rand(0, count($names)-1)]);
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue