Do you know how can I call an ASP.NET .dll file from a PHP scritp?
Thanks!
views:
620answers:
1
+1
A:
You use the DOTNET extension.
First off, you need to be running this on Windows. If you are on linux, then I would look at using something like Facebooks Thrift.
If you are on windows and depending on which build of windows you are using you may need to uncomment the com extension in your php.ini
<?php
$stack = new DOTNET("mscorlib", "System.Collections.Stack");
$stack->Push(".Net");
$stack->Push("Hello ");
echo $stack->Pop() . $stack->Pop();
?>
Here are a list of Windows Specific functions
chews
2008-11-22 04:41:32
This is definitly the way to go. Avoid COM as much as you can.
FlySwat
2008-11-22 04:49:46
Great!, any Linux suggestions?
ramayac
2008-11-22 05:15:49
If you have two boxs, one running windows (containing your .net methods) the other a linux one for PHP. Then the easiest is probably exposing the methods you need using a webservice. Dotnet does make it really easy to do that. And php now has awesome SOAP support.
chews
2008-11-22 22:31:35