| OLD | NEW |
| 1 <?php | 1 <?php |
| 2 | 2 if (isset($_SERVER['HTTP_ORIGIN']) && $_COOKIE['cookie'] != '') { |
| 3 if (isset($_GET['with_credentials'])) { | 3 header("Access-Control-Allow-Origin: *"); |
| 4 header("Access-Control-Allow-Origin: http://127.0.0.1:8000"); | |
| 5 header("Access-Control-Allow-Credentials: true"); | 4 header("Access-Control-Allow-Credentials: true"); |
| 5 $name = 'green-background.css'; |
| 6 } else { | 6 } else { |
| 7 header("Access-Control-Allow-Origin: *"); | 7 $name = 'red-background.css'; |
| 8 } | 8 } |
| 9 | 9 |
| 10 $name = 'laughter.wav'; | |
| 11 $fp = fopen($name, 'rb'); | 10 $fp = fopen($name, 'rb'); |
| 12 | 11 header("Content-Type: text/css"); |
| 13 header("Content-Type: audio/x-wav"); | |
| 14 header("Content-Length: " . filesize($name)); | 12 header("Content-Length: " . filesize($name)); |
| 15 | 13 |
| 16 fpassthru($fp); | 14 fpassthru($fp); |
| 17 exit; | 15 exit; |
| 18 ?> | 16 ?> |
| OLD | NEW |