C program interacting with PHP

I'm trying to find a way to get my PHP code to interact with a C program. I have an RFID reader that runs C code and I want my PHP code to read from it so I can authenticate users in my MySQL database. Any ideas where I can get info about passing variables from a C program to PHP and vice versa?
 
Why not authenticate using PHP?

You can always have the PHP code write to a file and have the C code open the file read the username/pass and authenticate that way. However, you need to send something back to PHP to tell PHP the user was authenticated.
 
Back
Top