Under Linux ,if I want to pass pure string from PHP to C, how do i do that? what I\'ve tried do far is:
exec(\"./myexec.bin -a mystring\");
If it is more like a data structure than a string, what about using an embedded webserver? At first sight it may sound like overkill for your purpose, but mongoose for example is a very lightweight embeddable webserver:
http://code.google.com/p/mongoose/
There's also a nice tutorial about the exact same problem you have, transfering data between a PHP application and a C/C++ application. It's in german, though ... but maybe google translator can help:
http://blog.aditu.de/2010/05/15/serverbridge-zwischen-php-und-cc/