Call dll from PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
monada
Forum Newbie
Posts: 2
Joined: Wed Apr 23, 2008 8:24 am

Call dll from PHP

Post by monada »

I googled how to call dll from php.
I found that I should use the COM extension to do this.
I followed some examples that use the COM to call the Internet Explorer application
$browser = new COM ("InternetExplorer.Application");
and it done successfully.

but when I tried to call my dll which name is 'zkemkeeper.dll'
and have a method which name is 'CZKEMClass'
I tried this code

Code: Select all

<?php
 
com_load_typelib('zkemkeeper.CZKEMClass');
$obj = new COM("zkemkeeper.CZKEMClass") or die("Unable to create com object");
?>
I got this error:
'Failed to create COM object `zkemkeeper.CZKEMClass'
User avatar
Mds
Forum Contributor
Posts: 110
Joined: Tue Apr 22, 2008 8:56 pm
Contact:

Re: Call dll from PHP

Post by Mds »

hi .
What would you like to do , exactly , that you want call DLL ?
User avatar
mattcooper
Forum Contributor
Posts: 210
Joined: Thu Mar 17, 2005 5:51 am
Location: London, UK

Re: Call dll from PHP

Post by mattcooper »

<sucks air thru teeth />
jlongino
Forum Newbie
Posts: 1
Joined: Mon Feb 13, 2017 1:06 pm

Re: Call dll from PHP

Post by jlongino »

Hi:

Are you solved this problem with zkemkeeper.dll???

I tryed with this code:

<?php

error_reporting(E_ALL);
ini_set("display_errors", 1);

$zk = new COM("zkemkeeper.ZKEM") or new Exception();

if ( $zk->Connect_Net('192.168.188.247',4370) ){
echo "Conectado";
} else {
echo "No Conectado";
}

$zk = null;
?>

Don't send me errors, but not connect with the fingerprint reader.

Thank's

pd
This are the new dlls http://www.zkteco.eu/uploads/ftp/SDK/Ne ... 32bits.zip
Post Reply