Skip to content

Instantly share code, notes, and snippets.

@fr34kyn01535
Last active March 14, 2016 20:29
Show Gist options
  • Save fr34kyn01535/802cf6c5ce62428c47fe to your computer and use it in GitHub Desktop.
Save fr34kyn01535/802cf6c5ce62428c47fe to your computer and use it in GitHub Desktop.
WebConfiguration Example
<?php header("Content-Type: application/xml; charset=utf-8");
header("Expires: on, 01 Jan 1970 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
if(!isset($_GET["configuration"]) || !isset($_GET["instance"])) die();
if(strstr($_GET["configuration"], '/') || strstr($_GET["configuration"], '.')) die();
if(file_exists("default/instances/".$_GET["instance"]."/".$_GET["configuration"].".config")){
echo file_get_contents("default/instances/".$_GET["instance"]."/".$_GET["configuration"].".config");
exit;
}else{
echo file_get_contents("default/".$_GET["configuration"].".config");
exit;
}?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment