btvendor.php 411 Bytes
<?php

$name = $_POST['name'];
if($name == "")
{
	$name = "file";
}

header('Content-type: application/btvendor');
header('Content-Disposition: attachment; filename="'.$name.'.btvb"');

$CURRENT_VERSION="1.0";
$output = (object)array(
	'version' => $CURRENT_VERSION,
	'name' => $_POST['name'],
	'machineID' => $_POST['machineid'],
	'commands' => explode(",",$_POST[commands])
	);
echo json_encode($output);

?>