On 8/28/07, Gevorg Harutyunyan <[EMAIL PROTECTED]> wrote:
>
> 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:[EMAIL PROTECTED]
> 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 <[EMAIL PROTECTED]> 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
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
No, this is not that tough. we did it before.

1. A C program retrieves data from several (more than 100) servers.
2. It saves the data in the MySQL db.
3. A php page is loaded with an ajax enabled
4. then a ajax call is sent to the same php file. it uses the setTimeout
function.
5. Data comes in json format.
6. data is formated by javascript and shown in the page.

Thats it.

-- 
shout at http://shiplu.awardspace.com/

Available for Hire/Contract/Full Time

Reply via email to