Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PHP/C++ Interaction

Posted on 2006-10-23
1
Medium Priority
?
261 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 525 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

963 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