Location: PHPKode > projects > Faxy > faxy/uploader.php
<?php
	include('config.php');
	$page = $_POST['pagename'];
	if ($_FILES['uploadedfile']['type'] != "application/pdf") {
		header("Location: ".$applicationBaseUri.$applicationBaseDir.$page.".php?err=002");
		break;
	}
	if ($_POST['faxnumber'] == "" or $_POST['faxnumber'] == null) {
		header("Location: ".$applicationBaseUri.$applicationBaseDir.$page.".php?err=003");
		break;
	}
	$aboutToSend = $_FILES['uploadedfile']['tmp_name'];
	$shellCommand = "sendfax -n -d ".$_POST['faxnumber']." ".$aboutToSend;
	$output = shell_exec($shellCommand."  2>&1");
	header("Location: ".$applicationBaseUri.$applicationBaseDir.$page.".php?err=004");
	break;
?>
Return current item: Faxy