Solved

PHP/C++ Interaction

Posted on 2006-10-23
1
249 Views
Last Modified: 2010-08-05
Although I've done a fair amount of web programming, this will be my first dive into PHP waters.  I need to build a basic front end that has a browse feature for files and accepts some other basic input.  The tricky part that I'm not sure about involves sending the input as parameters to a C++ program running in the background.  Are there any tutorials floating around that could walk me through how to do this interface in PHP?  Is there a way to incorporate C++ code directly into PHP to do file parsing on the client-side?  

They're basic questions, but I figure it's better to get pushed in the right direction rather than stumble around in the dark looking for the doorknob.  Thanks for your help.

Jason
0
Comment
Question by:cdromes
1 Comment
 
LVL 20

Accepted Solution

by:
virmaior earned 175 total points
ID: 17791339
(1) you could probably find file browsing systems in php on sourceforge
(2) "file parsing on the client-side" for c++ code doesn't make sense with the way php runs.  PHP produce web pages that get parsed by the end users browser
(3) you can get PHP to interact with your code in a number of ways:
   (a) you could compile an extension and then your code would run directly in php with the functions you wrote (though i don't know anyone who does this)
   (b) if you're running windows, you can make your DLL a COM object provider
   (c) you can exec the code and then take its output using the function passthru()  (see http://www.php.net/manual/en/ref.exec.php for an overview of php program running functions).


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now