Solved

PHP/C++ Interaction

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and 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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

706 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

15 Experts available now in Live!

Get 1:1 Help Now