can php interact with a c program?

This is a discussion on can php interact with a c program? within the PHP Language forums, part of the PHP Programming Forums category; i do some web db stuff using php. i coworker asked me if he could develop a php front end ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-22-2005
skeeterbug
 
Posts: n/a
Default 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...

Reply With Quote
  #2 (permalink)  
Old 02-22-2005
noSpam
 
Posts: n/a
Default Re: can php interact with a c program?

Michael Vilain wrote:
> In article <1109052413.087955.244580@z14g2000cwz.googlegroups .com>,
> "skeeterbug" <jskeith1@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"
Reply With Quote
  #3 (permalink)  
Old 02-25-2005
Jean-Marc Molina
 
Posts: n/a
Default Re: can php interact with a c program?

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.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:45 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0