Hi there!

I'm would like to run some of my own c++ functions through php script in Windows.
To do so I'd have to write my own extension and I tried writing a built-in php module and compiling it with Cygwin.
While trying to compile an extension with Cygwin it seems I need Automake and Automake needs Perl installed on the system.
I wondered if it's not easier to build an external extension module in the form of a dll and if somebody already did this.
I'd like to have some pointers and/or an example/tutorial on doing this, because I can't find a thing on the web. Can somebody refer me to one of these.
I'd appreciate it.

Regards,

Awin

    Awin, this is a good idea but I don't know of an opensource project that does this yet. Many of the open projects are multi-platform focused and therefore don't concentrate on win32 platforms.

    That being said, one easier way to integrate your C++ code with PHP is to simly build a CGI or ISAPI extension using traditional methods. Then fopen or fsockopen (on your own server) the URL to invoke the CGI. You can easily pass args to it using GET or POST methods... return XML or CSV... and you can get this all done in a fraction of the time it'll probably take to build an extension.

    Just a suggestion. Dave

    ===========================================
    http://badblue.com/helpphp.htm
    Free small footprint web server for Windows

    Share files... get PHP up and running fast

      Dave,
      First of all thanks for your reply. Could you refer me to a tutorial or sample of building a CGI or ISAPI extension? I'm kinda new to this, therefor I'm not familiar with the traditional methods you mentioned. Thanks a lot, it'll be of great help...

      Regards,

      Awin

        a year later

        hello awin,

        were u able to run ur c++ funs. from php? i want to do something similar. i want to use some DLL functions that i created in VB, in php. I saw the dosumentation and can see COM functions as one way of doing it, but could not see any examples. Does anyone have any code samples on how to include dlls in php code?

        thanks

          Write a Reply...