Add background scripts
This commit is contained in:
parent
43de459103
commit
8cc3bd12e3
20
bg.php
Executable file
20
bg.php
Executable file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
//renaming to bg.php
|
||||
$dir = "walls/";
|
||||
$files = scandir($dir);
|
||||
$images = array_diff($files, array('.', '..'));
|
||||
$name = $images[array_rand($images)];
|
||||
// open the file in a binary mode
|
||||
$fp = fopen($dir . $name, 'rb');
|
||||
|
||||
// send the right headers
|
||||
header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1
|
||||
header('Pragma: no-cache'); // HTTP 1.0
|
||||
header('Expires: 0'); // Proxies
|
||||
header('Content-Type: ' . $fp['type']);
|
||||
header('Content-Length: ' . $fp['bytes']);
|
||||
|
||||
// dump the picture and stop the script
|
||||
fpassthru($fp);
|
||||
exit;
|
||||
?>
|
20
c.php
Executable file
20
c.php
Executable file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
$dir = "banners/";
|
||||
$files = scandir($dir);
|
||||
$images = array_diff($files, array('.', '..'));
|
||||
$name = $images[array_rand($images)];
|
||||
$fp = fopen($dir . $name, 'rb');
|
||||
|
||||
// send the right headers
|
||||
header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1
|
||||
header('Pragma: no-cache'); // HTTP 1.0
|
||||
header('Expires: 0'); // Proxies
|
||||
header('Content-Type: ' . $fp['type']);
|
||||
header('Content-Length: ' . $fp['bytes']);
|
||||
|
||||
// dump the picture and stop the script
|
||||
//fpassthru($fp);
|
||||
print($fp['type']);
|
||||
print('dicks');
|
||||
exit;
|
||||
?>
|
Loading…
Reference in New Issue
Block a user