Page 1 of 1

php to execute commands in c++ programs

Posted: Tue Jul 25, 2006 1:28 pm
by kdoggfunkstah
Currently I have PHP4 running on my localhost and I can execute programs that I've written (a simple program that will insert a dummy entry into a sqlite database).

What I want to do is somehow initiate an event in a program (a daemon to be specific), (unlike previously executing a specific program).

I have this board that needs to be pinged, and I am required that I do not run a separate program. I need to see how I can turn on like an interrupt, or perhaps a polling scheme to allow this, but I'm not sure how it can be done.

Another solution would be to call a program, which will interface with the daemon... how would that work?

Thanks in advance!

Posted: Tue Jul 25, 2006 2:39 pm
by tecktalkcm0391
execute() ? not sure though is that right?

Posted: Tue Jul 25, 2006 2:45 pm
by kdoggfunkstah
well, i currently have this post button:

<form method="POST" action="<?php exec("/root/armtest"); ?>">

however in the end I want to be able to trigger a function within a c++ program (the daemon) that is written. any ideas?