<?php
	
	

	if (isset($_GET['test'])) {
		$name = 'dance.gif';
		header('Content-Type: image/gif');
	} else {
		$name = 'email_track_blank.png';
		header("Content-Type: image/png");
	}


	if (isset($_GET['ecards'])) {
		if (isset($_GET['preview'])) {} else {
			include('_functions2.php');
			trackEmail($_GET['ecards']);
		}
	}

// open the file in a binary mode

// $name = 'email_track_blank_test.png';
$fp = fopen($name, 'rb');

// send the right headers

header("Content-Length: " . filesize($name));

// dump the picture and stop the script
fpassthru($fp);
exit;
?>