Calling some DLL functions from within PHP (no ASP)
| From: | php at brazilinfo dot com | Date: | Mon, 27 Nov 2000 19:59:30 +0000 |
| Subject: | Calling some DLL functions from within PHP (no ASP) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-27442@lists.php.net to get a copy of this message | ||
Hi!
I need to call some functions that reside inside a .DLL supplied by a third
party and which shall be used in our project (a web site mostly built with
PHP but that will have to run on NT because of these .DLLs). We will not have
access to the details of the implementations of DLL so that we are not able
to port it to PHP. We shall call the functions from this DLL by instantiating
an object and then calling the functions with the correct formatted
parameters.
The code inside an ASP file would be something like:
<%
' --- activeX
Dim Xvar
Set Xvar = CreateObject("third_party_dll")
' --- vars parameter1, parameter2, etc. shall already have values
' as received from user input at a form or in a hardcoded manner
output = Xvar.dll_function(parameter1, parameter2, ...)
Set Xvar = Nothing
%>
I can make a PHP form and when the user submits it I would call the ASP file
with the above Visual Basic snippet, and then format the HTML output.
But I would like to invoke the above DLL function from inside PHP and have
the result available at my PHP script instead of generating the HTML output
from inside the ASP script. This is because our system already uses a
complete architecture based in PHP (with templates and so on), so that the
formatting of the output would be better built inside PHP.
Any hints?
TIA,
Paulo