<?php
$tmpdir = sys_get_temp_dir();
$file = tempnam($tmpdir, 'ctk');
$handle = fopen($file, 'w');
$condensed = Chr(27) . Chr(33) . Chr(4);
$bold1 = Chr(27) . Chr(69);
$bold0 = Chr(27) . Chr(70);
$initialized = chr(27).chr(64);
$condensed1 = chr(15);
$condensed0 = chr(18);
$Data = $initialized;
$Data .= $condensed1;
$Data .= "----------------------------\n";
$Data .= "         JNE TARUNA         \n";
$Data .= "----------------------------\n";
$Data .= "Selamat datang,\n";
$Data .= "--------------------------\n";
fwrite($handle, $Data);
fclose($handle);
copy($file, "//localhost/printer"); # Lakukan cetak
unlink($file);
?>


<!DOCTYPE       html       PUBLIC       "-//W3C//DTD       XHTML       1.0       Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title></head><body><center><a href='cetak/print_mhs.php' ><img src='cetak/images/print.png'></a></center>// akan menampilkan gambar printer<div align="center">Daftar Mahasiswa</div>