<?php

	class wpsg_header
	{
		
		public static function startDownloadContent($filename, $content)
		{
			
			header('Content-Description: File Transfer');
			header('Content-Type: application/octet-stream');
			header('Content-Disposition: attachment; filename='.$filename);
			header('Content-Transfer-Encoding: binary');
			header('Connection: Keep-Alive');
			header('Expires: 0');
			header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
			header('Pragma: public');
			header('Content-Length: '.strlen($content));
			
			die($content);
			
		} // public static function startDownload($filename)
		
		public static function PDFPlugin($file)
		{
			
			header("Cache-Control: no-cache, must-revalidate"); 
			header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
			header('Content-type: application/pdf');			
			header('Content-Disposition: inline; filename="'.basename($file).'"');
			
			readfile($file);
			
		} // public static function PDFPlugin($filename)
		
		public static function JSONData($arData)
		{
			
			header('Content-Type: application/json');
			die(json_encode($arData));
			
		} // public static function JSONData()
		
	} // class wpsg_header

?>