473,395 Members | 1,583 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

can php interact with a c program?

i do some web db stuff using php. i coworker asked me if he could
develop a php front end that would ultimately end up interacting with a
program he had written in c (c++ or whatever).

can php do this sort of thing or is it a dead end? tia...

Jul 17 '05 #1
3 2508
In article <11**********************@z14g2000cwz.googlegroups .com>,
"skeeterbug" <js******@san.rr.com> wrote:
i do some web db stuff using php. i coworker asked me if he could
develop a php front end that would ultimately end up interacting with a
program he had written in c (c++ or whatever).

can php do this sort of thing or is it a dead end? tia...


http://us4.php.net/manual/en/function.system.php
http://us4.php.net/manual/en/function.passthru.php

This assumes the C program does everything through standard input and
output. Then you can just call it from the system() or passthru()
functions.

--
DeeDee, don't press that button! DeeDee! NO! Dee...

Jul 17 '05 #2
Michael Vilain wrote:
In article <11**********************@z14g2000cwz.googlegroups .com>,
"skeeterbug" <js******@san.rr.com> wrote:

i do some web db stuff using php. i coworker asked me if he could
develop a php front end that would ultimately end up interacting with a
program he had written in c (c++ or whatever).

can php do this sort of thing or is it a dead end? tia...

http://us4.php.net/manual/en/function.system.php
http://us4.php.net/manual/en/function.passthru.php

This assumes the C program does everything through standard input and
output. Then you can just call it from the system() or passthru()
functions.

Or shared memory or flat files or a table in a database or the Zend API,
lots of ways, depends upon what you mean by "interact"
Jul 17 '05 #3
skeeterbug a écrit/wrote :
i do some web db stuff using php. i coworker asked me if he could
develop a php front end that would ultimately end up interacting with
a program he had written in c (c++ or whatever).

can php do this sort of thing or is it a dead end? tia...


Sure, see your application as a client-server one. There are different ways
to implement such an application and the best one is probably to make your
PHP application a web service. Using XML protocols like SOAP so you should
be able to send messages from one application to an other, exchange data,
anything. It all depends of what you want to do. What did you mean by
interaction ? Real-time respond ? Data exchange ? Data fetch at a specific
time of the day ?

--
Jean-Marc.

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: hugo27 | last post by:
hugo27 July 13, 2004 > >The teachy books and documentation I've read do not >mention the Escape key, but everytime I hit it during >runtime my programs go bananas. > >This relates to a larger...
4
by: yogishaj | last post by:
How to interact with Oracle, MS-SQL and Sybase databases using C Language. Please provide me information about links or books which discuss this subject
9
by: Tommy Lu | last post by:
Hi, wondering if there is a way to interact the shell command with the C# program? For example, if I type c:\>ver it then suppose to return the version of the OS I am currently using... or ...
6
by: Ian Frawley | last post by:
Hello everyone I have written a Windows Service to monitor local and remote Processes/Applications. However I am stuck because if it is installed as a user account I cannot get it to interact...
10
by: Steve | last post by:
I want to make a web application that will run on my home server and would like to be able to have the web application interact with another, winforms application. For example, let's say I wanted...
4
by: aam | last post by:
How can i set up vb.net to read and interact with a web page ? the web page is actually a game screen of a free online game i'm playing. using a winform, i'm trying to write a program that will...
4
by: aam | last post by:
how can i set up vb.net to interact with a game i'm playing online ? the game is a java applet. i'm trying to write a program using a winform to assist me with this game.i tried using sendkeys but...
0
by: wayne hamilton | last post by:
I'm having a problem Interacting with Command Line programs. I can read and write anything I want as long as I don't have to interact with a process once it's started. Originally I had been calling...
1
by: mohamed azaz | last post by:
hi can I interact with fax modem directly without using any windows classes? I means I want to make program by c++ interact with fax modem directly or I have to use MFC
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.