Skip to content

Instantly share code, notes, and snippets.

@msdousti
Created July 3, 2017 09:35
Show Gist options
  • Save msdousti/b98f225512bd21ba23caebc5548f4678 to your computer and use it in GitHub Desktop.
Save msdousti/b98f225512bd21ba23caebc5548f4678 to your computer and use it in GitHub Desktop.
A simple PHP file, returning "204 NO CONTENT" in response to any request
<?php
ob_start();
header("HTTP/1.1 204 NO CONTENT");
header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0"); // Proxies.
ob_end_flush(); //now the headers are sent
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment