php to execute commands in c++ programs

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kdoggfunkstah
Forum Newbie
Posts: 2
Joined: Tue Jul 25, 2006 1:24 pm

php to execute commands in c++ programs

Post 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!
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

execute() ? not sure though is that right?
kdoggfunkstah
Forum Newbie
Posts: 2
Joined: Tue Jul 25, 2006 1:24 pm

Post 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?
Post Reply