RE: [PHP] c++ and php! search for a brigde
| From: | Gevorg Harutyunyan | Date: | Tue, 28 Aug 2007 19:56:45 +0000 |
| Subject: | RE: [PHP] c++ and php! search for a brigde | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-261419@lists.php.net to get a copy of this message | ||
Barev David,
I think this is solution
1. C/C++ updates database (MySQL or other)
2. There is some PHP file that is viewing your DB info(printing static info)
3. There is other PHP file that is using AJAX for interactive update of
information (This one is sending request to first PHP file and if needed
updating second one)
I don't know maybe this is very complex, but I would choose this one ;)
Best,
Gevorg
-----Original Message-----
From: David Giragosian [mailto:dgiragosian@gmail.com]
Sent: Tuesday, August 28, 2007 10:08 PM
To: Simon
Cc: php-general@lists.php.net
Subject: Re: [PHP] c++ and php! search for a brigde
On 8/28/07, Simon <simon.xhz@gmail.com> wrote:
>
> you can use sockets in php, they work the same as berkley sockets
> you can use system() in php, to call your C++ program (the program
> could output html)
> in my opinon CGI with C/C++ is obsolete, use php/apache for best results!
>
> another nice way is to have your C++ program independent, outputs its
> results/values into a database (mysql)... and a php page will just
> read what's in the database to display it nicely.
That's what we do here. C/C++ app gathers and inserts the data into the db,
minute by minute, and PHP apps are used for display, reports, graphics,
etc... Our LAMP system has had nary a glitch in over 3 years of continuous
usage.
That would be a clean way of doing it.
>
> Good luck!
David