diff options
author | emkael <emkael@tlen.pl> | 2015-01-27 16:31:12 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2015-01-27 16:31:12 +0100 |
commit | cab5dcbafb0f82ba742ac014741dfc4208be9fbd (patch) | |
tree | 3081fc9150ac7d15280c099a4699085a2a27087f /http/pic/fetch.php |
* initial commit
Diffstat (limited to 'http/pic/fetch.php')
-rw-r--r-- | http/pic/fetch.php | 13 |
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); +} + +?> |