jessica128Avatar border
TS
jessica128
fingerprint Soution x100C menggunakan PHP dan SOAP
Mohon bantuannya saya lagi skripsi dan sangat butuh bantuan dalam pengerjaannya.
saya punya mesin sidik jari merk Solution X100C,
bila diakses dengan PHP dan SOAP, dia tidak menimbulkan error pada halaman browser,
tetapi dia juga tidak memunculkan database absensi dari mesin.
boleh tolong dibantu, halaman PHPnya ada di bawah tulisan inil,

<html>
<head><title>Contoh Koneksi Mesin Absensi Mengunakan SOAP Web Service</title></head>
<body bgcolor="#caffcb">

<H3>Download Log Data</H3>

<?
$IP=$HTTP_GET_VARS["ip"];
$Key=$HTTP_GET_VARS["key"];
if($IP=="") $IP="192.168.1.201";
if($Key=="") $Key="123";
?>

<form action="tarik-data.php">
IP Address: <input type="Text" name="ip" value="<?=$IP?>" size=15><BR>
Comm Key: <input type="Text" name="key" size="5" value="<?=$Key?>"><BR><BR>

<input type="Submit" value="Download">
</form>
<BR>

<?
if($HTTP_GET_VARS["ip"]!=""){?>
<table cellspacing="2" cellpadding="2" border="1">
<tr align="center">
<td><B>UserID</B></td>
<td width="200"><B>Tanggal & Jam</B></td>
<td><B>Verifikasi</B></td>
<td><B>Status</B></td>
</tr>
<?
$Connect = fsockopen($IP, "4370", $errno, $errstr, 1);
if($Connect){
$soap_request="<GetAttLog><ArgComKey xsi:type=\\\\"xsd:integer\">".$Key."</ArgComKey><Arg><PIN xsi:type=\"xsd:integer\">All</PIN></Arg></GetAttLog>";
$newLine="\\\\r\\\\n";
fputs($Connect, "POST /iWsService HTTP/1.0".$newLine);
fputs($Connect, "Content-Type: text/xml".$newLine);
fputs($Connect, "Content-Length: ".strlen($soap_request).$newLine.$newLine);
fputs($Connect, $soap_request.$newLine);
$buffer="";
while($Response=fgets($Connect, 1024)){
$buffer=$buffer.$Response;
}
}else echo "Koneksi Gagal";

include("parse.php");
$buffer=Parse_Data($buffer,"<GetAttLogResponse>","</GetAttLogResponse>");
$buffer=explode("\r\n",$buffer);

for($a=0;$a<count($buffer);$a++){
$data=Parse_Data($buffer[$a],"<Row>","</Row>");
$PIN=Parse_Data($data,"<PIN>","</PIN>");
$DateTime=Parse_Data($data,"<DateTime>","</DateTime>");
$Verified=Parse_Data($data,"<Verified>","</Verified>");
$Status=Parse_Data($data,"<Status>","</Status>");
?>
<tr align="center">
<td><?echo $PIN?></td>
<td><?=$DateTime?></td>
<td><?=$Verified?></td>
<td><?=$Status?></td>
</tr>
<?}?>
</table>
<?}?>

</body>
</html>
Diubah oleh jessica128 20-12-2013 03:47
nona212
nona212 memberi reputasi
1
31.4K
21
GuestAvatar border
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Urutan
Terbaru
Terlama
GuestAvatar border
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Komunitas Pilihan