summaryrefslogtreecommitdiff
path: root/b.php
diff options
context:
space:
mode:
Diffstat (limited to 'b.php')
-rwxr-xr-xb.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/b.php b/b.php
new file mode 100755
index 00000000..1bd3e670
--- /dev/null
+++ b/b.php
@@ -0,0 +1,20 @@
+<?php
+//renaming to b.php
+$dir = "banners/";
+$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;
+?>