OLD | NEW |
1 <?php | 1 <?php |
| 2 $cookie_check = $_GET["Cookie"]; |
| 3 if (isset($cookie_check)) { |
| 4 if ($cookie_check == "NotSet") { |
| 5 if (isset($_COOKIE['TestCookie'])) { |
| 6 header("HTTP/1.0 404 Not Found"); |
| 7 exit; |
| 8 } |
| 9 } else if ($cookie_check != $_COOKIE['TestCookie']) { |
| 10 header("HTTP/1.0 404 Not Found"); |
| 11 exit; |
| 12 } |
| 13 } |
| 14 |
2 header("Access-Control-Allow-Origin: http://127.0.0.1:8000"); | 15 header("Access-Control-Allow-Origin: http://127.0.0.1:8000"); |
3 header("Access-Control-Allow-Credentials: true"); | 16 header("Access-Control-Allow-Credentials: true"); |
4 | 17 |
5 $name = 'abe.png'; | 18 $name = 'abe.png'; |
6 $fp = fopen($name, 'rb'); | 19 $fp = fopen($name, 'rb'); |
7 header("Content-Type: image/png"); | 20 header("Content-Type: image/png"); |
8 header("Content-Length: " . filesize($name)); | 21 header("Content-Length: " . filesize($name)); |
9 | 22 |
10 fpassthru($fp); | 23 fpassthru($fp); |
11 exit; | 24 exit; |
12 ?> | 25 ?> |
OLD | NEW |