calculations in C, userinterface in PHP – PHP

  php

Q(Question):

I was thinking about building a Web utility with a tried-and-tested
(15 years) C-module.

I was thinking of generating an input-web-page with PHP, which would
send back data to the server (FORM-stuff), where a C-routine would do
the complex calculations, and give output back to the user, again via
a PHP routine.

is this feasible ?
practical ?
smart ?

frgr
Erik

A(Answer):

"Erik" <et57 at correos calor dot com> wrote in message
news:c8********************************@4ax.com…

I was thinking about building a Web utility with a tried-and-tested
(15 years) C-module.

I was thinking of generating an input-web-page with PHP, which would
send back data to the server (FORM-stuff), where a C-routine would do
the complex calculations, and give output back to the user, again via
a PHP routine.

is this feasible ?
practical ?
smart ?

frgr
Erik

Feasable, yes.

Smart? Well, do what is faster (to implement), easier, less expensive.
Practical? If you can make it happen go for it.

If you only have a few visitors (few thousand) don’t worry about it, go for
it any way that you can make it happen.


Mike Bradley
http://www.gzentools.com — free online php tools

A(Answer):

Erik wrote:

I was thinking about building a Web utility with a tried-and-tested
(15 years) C-module.

I was thinking of generating an input-web-page with PHP, which would
send back data to the server (FORM-stuff), where a C-routine would do
the complex calculations, and give output back to the user, again via
a PHP routine.

This is not a C question. Could those who reply in comp.lang.php please
remove the crosspost to clc?

Brian Rodenborn

A(Answer):

Erik wrote:

I was thinking about building a Web utility with a tried-and-tested
(15 years) C-module.

I was thinking of generating an input-web-page with PHP, which would
send back data to the server (FORM-stuff), where a C-routine would do
the complex calculations, and give output back to the user, again via
a PHP routine.

is this feasible ?
practical ?
smart ?

Sure, I’ve done it. I think there are ways to integrate other libraries,
but it also works to just create a C-based app and call it from the PHP
code using popen() or the like. Note that this will cause the creation
of process to execute the program, with the attendant overhead.

Brian Rodenborn

A(Answer):

Erik wrote:

I was thinking about building a Web utility with a tried-and-tested
(15 years) C-module.

I was thinking of generating an input-web-page with PHP, which
would send back data to the server (FORM-stuff), where a C-routine
would do the complex calculations, and give output back to the
user, again via a PHP routine.

is this feasible ?
practical ?
smart ?

on-topic for c.l.c?

In order: maybe, maybe, see 1, no.


Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!

A(Answer):

[c.l.c crosspost removed]

Erik <et57 at correos calor dot com> wrote in message news:<c8********************************@4ax.com>. ..

I was thinking about building a Web utility with a tried-and-tested
(15 years) C-module.

I was thinking of generating an input-web-page with PHP, which would
send back data to the server (FORM-stuff), where a C-routine would do
the complex calculations, and give output back to the user, again via
a PHP routine.

is this feasible ?
practical ?

1. http://in.php.net/exec – Simple & Easy

2. http://in.php.net/zend.creating – Bit complex. But, easy to manage
components in future. And highly professional.
smart ?

See what Michael J. Radwin of Yahoo! says.
<http://public.yahoo.com/~radwin/talks/one-year-of-php-oscon2003_files/slide0093.htm>
[Alert: Stop the page before it redirects to parent page]

"Success = 10% sweat + 90% tears"
Email: rrjanbiah-at-Y!com

A(Answer):

Em Fri, 06 Feb 2004 19:44:54 +0100, Erik escreveu:

I was thinking about building a Web utility with a tried-and-tested
(15 years) C-module.

I was thinking of generating an input-web-page with PHP, which would
send back data to the server (FORM-stuff), where a C-routine would do
the complex calculations, and give output back to the user, again via
a PHP routine.

is this feasible ?
Yes practical ?
Yes smart ?

Dunno

Perhaps what you want is to write a C CGI frontend to your module (if you
can’t make itself a CGI app), and use the PHP to create a page that has a
<form action="your-c-frontend.cgi">. The PHP output would be a little
harder to do, but still possible.


Quidquid latine dictum sit altum viditur

LEAVE A COMMENT