summaryrefslogtreecommitdiff
path: root/http/pic/fetch.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2015-01-27 16:31:12 +0100
committeremkael <emkael@tlen.pl>2015-01-27 16:31:12 +0100
commitcab5dcbafb0f82ba742ac014741dfc4208be9fbd (patch)
tree3081fc9150ac7d15280c099a4699085a2a27087f /http/pic/fetch.php
* initial commit
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);
+}
+
+?>