<?php
	/*
		File Created and Mime Types Researched by Navarr T. Barnier

		File is licensed for WiiCR and WiiMedia, with only those
			projects being allowed to edit and redistribute this file.

		All other projects must get written consent of Navarr T. Barnier
			before editing or distributing this file.

		Contact:
			navarr@gtaero.net
			AIM: navarr6
			YIM: navarr6
			MSN: navarr@gmail.com

		Usage:
			/location/to/this/file.php?loc=C:\Location\to\Requested\File.png

		This file will then display the file that is requested, as long as said
			file has permissions that allows it to be read by the web server.

	*/
	$loc = $_GET['loc'];
	if (strtolower(substr($loc,-4,4)) == '.jpg') { header('Content-Type: image/jpeg');}
	if (strtolower(substr($loc,-5,5)) == '.jpeg'){ header('Content-Type: image/jpeg');}
	if (strtolower(substr($loc,-5,5)) == '.jfif'){ header('Content-Type: image/jpeg');}
	if (strtolower(Substr($loc,-4,4)) == '.jpe') { header('Content-Type: image/jpeg');}
	if (strtolower(substr($loc,-4,4)) == '.jps') { header('Content-Type: image/x-jps');}
	if (strtolower(substr($loc,-3,3)) == '.js')  { header('Content-Type: application/x-javascript'); }
	if (strtolower(substr($loc,-4,4)) == '.jut') { header('Content-Type: image/jutvision'); }
	if (strtolower(substr($loc,-4,4)) == '.mcf') { header('Content-Type: image/vasa'); }
	if (strtolower(substr($loc,-4,4)) == '.nap') { header('Content-Type: image/naplps');}
	if (strtolower(substr($loc,-7,7))=='.naplps'){ header('Content-Type: image/naplps');}
	if (strtolower(substr($loc,-4,4)) == '.nif') { header('Content-Type: image/x-niff');}
	if (strtolower(substr($loc,-5,5)) == '.niff'){ header('Content-Type: image/x-niff');}
	if (strtolower(substr($loc,-4,4)) == '.png') { header('Content-Type: image/png'); }
	if (strtolower(substr($loc,-4,4)) == '.gif') { header('Content-Type: image/gif'); }
	if (strtolower(substr($loc,-4,4)) == '.bmp') { header('Content-Type: image/bmp'); }
	if (strtolower(substr($loc,-3,3)) == '.bm')  { header('Content-Type: image/bmp'); }
	if (strtolower(substr($loc,-5,5)) == '.tiff'){ header('Content-Type: image/tiff'); }
	if (strtolower(substr($loc,-4,4)) == '.swf') { header('Content-Type: application/x-shockwave-flash'); }
	if (strtolower(substr($loc,-4,4)) == '.mp3') { header('Content-Type: audio/mpeg3'); }
	if (strtolower(substr($loc,-4,4)) == '.flv') { header('Content-Type: video/flv'); }
	if (strtolower(substr($loc,-4,4)) == '.svg') { header('Content-Type: image/svg+xml'); }
	if (strtolower(substr($loc,-4,4)) == '.txt') { header('Content-Type: text/plain'); }
	if (strtolower(substr($loc,-4,4)) == '.css') { header('Content-Type: text/css'); }
	if (strtolower(substr($loc,-4,4)) == '.xml') { header('Content-Type: application/xml'); }
	if (strtolower(substr($loc,-4,4)) == '.rss') { header('Content-Type: application/rss+xml'); }
	if (strtolower(substr($loc,-4,4)) == '.htm') { header('Content-Type: text/html'); }
	if (strtolower(substr($loc,-5,5)) == '.html'){ header('Content-Type: text/html'); }
	if (strtolower(substr($loc,-4,4)) == '.art') { header('Content-Type: image/x-jg'); }
	if (strtolower(substr($loc,-4,4)) == '.dwg') { header('Content-Type: image/x-dwg'); }
	if (strtolower(substr($loc,-4,4)) == '.dxf') { header('Content-Type: image/x-dwg'); }
	if (strtolower(substr($loc,-4,4)) == '.fif') { header('Content-Type: image/fif'); }
	if (strtolower(substr($loc,-4,4)) == '.flo') { header('Content-Type: image/florian'); }
	if (strtolower(substr($loc,-4,4)) == '.fpx') { header('Content-Type: image/vnd.fpx'); }
	if (strtolower(substr($loc,-3,3)) == '.g3')  { header('Content-Type: image/g3fax'); }
	if (strtolower(Substr($loc,-4,4)) == '.ico') { header('Content-Type: image/x-icon'); }
	if (strtolower(substr($loc,-4,4)) == '.ief') { header('Content-Type: image/ief'); }
	if (strtolower(substr($loc,-5,5)) == '.iefs'){ header('Content-Type: image/ief'); }
	if (strtolower(substr($loc,-4,4)) == '.pbm') { header('Content-Type: image/x-portable-bitmap'); }
	if (strtolower(substr($loc,-4,4)) == '.pct') { header('Content-Type: image/x-pict'); }
	if (strtolower(substr($loc,-4,4)) == '.pcx') { header('Content-Type: image/x-pcx'); }
	if (strtolower(substr($loc,-4,4)) == '.pgm') { header('Content-Type: image/x-portable-graymap'); }
	if (strtolower(substr($loc,-4,4)) == '.pic') { header('Content-Type: image/pict'); }
	if (strtolower(substr($loc,-5,5)) == '.pict'){ header('Content-Type: image/pict'); }
	echo file_get_contents($loc);
?>

