Solved

PHP/C++ Interaction

Posted on 2006-10-23
1
251 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

813 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

9 Experts available now in Live!

Get 1:1 Help Now