summaryrefslogtreecommitdiff
path: root/http/pic/fetch.php
diff options
context:
space:
mode:
Diffstat (limited to 'http/pic/fetch.php')
-rw-r--r--http/pic/fetch.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/http/pic/fetch.php b/http/pic/fetch.php
new file mode 100644
index 0000000..1fb94cd
--- /dev/null
+++ b/http/pic/fetch.php
@@ -0,0 +1,13 @@
+<?php
+
+$resource = @file_get_contents('http://msc.com.pl/cezar' . $_SERVER['REQUEST_URI']);
+if ($resource) {
+ $filename = array_pop(explode('/', $_SERVER['REQUEST_URI']));
+ file_put_contents($filename, $resource);
+ foreach ($http_response_header as $header) {
+ header($header);
+ }
+ readfile($filename);
+}
+
+?>