473,387 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

calculations in C, userinterface in PHP

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
Nov 14 '05 #1
11 2775
"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
Nov 14 '05 #2
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
Nov 14 '05 #3
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!
Nov 14 '05 #4
On Fri, 6 Feb 2004 19:58:33 GMT, the right honourable Default User
<fi********@boeing.com.invalid> wrote:
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


In my opinion, it is a question that crosses the blurred boundaries
between C, PHP, HTML and even MySQL.

That is exactly the reason I cross-posted.
There is no newsgroup comp.languages.php.c.mysql.html, thank The Lord.

At least two C-aspects of the question come to mind:

- maybe I need to work on the C-side interface, to make the connection
to PHP.
- How would the data-interfacing structures have to look...

Maybe the answers will learn me, that I need not do anything to the
C-code. But only that **answer** would make this a non-C question and
therefor off-topic. The **question** is not.

A bit philosophical maybe, and yes: philosophy IS off-topic :-)

friendly greetings

Erik
Nov 14 '05 #5
On Sat, 07 Feb 2004 11:48:47 +0100, in comp.lang.c , Erik <et57 at
correos calor dot com> wrote:
On Fri, 6 Feb 2004 19:58:33 GMT, the right honourable Default User
<fi********@boeing.com.invalid> wrote:

This is not a C question. Could those who reply in comp.lang.php please
remove the crosspost to clc?
At least two C-aspects of the question come to mind:

- maybe I need to work on the C-side interface, to make the connection
to PHP.


This is impossible in C.
- How would the data-interfacing structures have to look...


Thats also impossible to say.

The point is, C doesn't have an interface to PHP. If you want to
interface to PHP or mysql or whtever, you need to use nonstandard
extensions to C, which are not discussed in this group.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #6
On Sun, 08 Feb 2004 00:19:30 +0000, the right honourable Mark McIntyre
<ma**********@spamcop.net> wrote:
On Sat, 07 Feb 2004 11:48:47 +0100, in comp.lang.c , Erik <et57 at
correos calor dot com> wrote:
On Fri, 6 Feb 2004 19:58:33 GMT, the right honourable Default User
<fi********@boeing.com.invalid> wrote:

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

At least two C-aspects of the question come to mind:

- maybe I need to work on the C-side interface, to make the connection
to PHP.


This is impossible in C.
- How would the data-interfacing structures have to look...


Thats also impossible to say.

The point is, C doesn't have an interface to PHP. If you want to
interface to PHP or mysql or whtever, you need to use nonstandard
extensions to C, which are not discussed in this group.


forgive me to contradict you:

As I said, I cross-posted to the PHP people, and they gave me some doc
links, that tell me in rather great detail how to do it.

As I once interfaced these same routines to Prolog, many years ago, I
suspected it could be done to PHP also. and I appear to be right.

In my opinion (which is now confirmed again) C-code can be interface
to just about anything.
The How-question is another matter: not at all easy sometimes.

As to "which are not discussed in this group":
This is weird:
My question is about connecting C-code with PHP-code.
If clc says it's off topic, logically the php groups should say so
too.
Result would be that my question cannot have a place on Usenet. Which
again is contrary to the Usenet idea, for it's not feasible to make a
C-and-PHP group.
Number of groups would quickly become astronomical.

(think of: "alt.dog-breeding" , "alt.paris" and
"alt.dog-breeding.paris" ... hey come on !!)

As it is a question about C AND/OR PHP, cross-posting seems to be a
most logical thing to do **in this case**.

The answers would in both groups be limited to the appropriate "side"
of the question, I would expect.

Please feel free to disagree ;-)

friendly greetings,

Erik
Nov 14 '05 #7
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

Nov 14 '05 #8
On Sun, 08 Feb 2004 16:04:27 +0100, Erik <et57 at correos calor dot
com> wrote:
On Sun, 08 Feb 2004 00:19:30 +0000, the right honourable Mark McIntyre
<ma**********@spamcop.net> wrote:
On Sat, 07 Feb 2004 11:48:47 +0100, in comp.lang.c , Erik <et57 at
correos calor dot com> wrote:
On Fri, 6 Feb 2004 19:58:33 GMT, the right honourable Default User
<fi********@boeing.com.invalid> wrote:

This is not a C question. Could those who reply in comp.lang.php please
remove the crosspost to clc?
<snip>The point is, C doesn't have an interface to PHP. If you want to
interface to PHP or mysql or whtever, you need to use nonstandard
extensions to C, which are not discussed in this group.
forgive me to contradict you:

As I said, I cross-posted to the PHP people, and they gave me some doc
links, that tell me in rather great detail how to do it.

Contradict all you like - the C standard says nothing about interfaces
to PHP. That is not to say that it can't be done, only that it
requires nonstandard extension, as Mark said.

<snip>
As to "which are not discussed in this group":
This is weird:
My question is about connecting C-code with PHP-code.
If clc says it's off topic, logically the php groups should say so
too.
Why? The php groups can have their own definition of topicality. This
group restricts its topic to standard C, which you would know if you
spent a reasonable amount of time reading the group before posting to
it.
Result would be that my question cannot have a place on Usenet. Which
again is contrary to the Usenet idea, for it's not feasible to make a
C-and-PHP group.
Number of groups would quickly become astronomical.
That's why there are more general groups, such as comp.programming.
(think of: "alt.dog-breeding" , "alt.paris" and
"alt.dog-breeding.paris" ... hey come on !!)

As it is a question about C AND/OR PHP, cross-posting seems to be a
most logical thing to do **in this case**.

The answers would in both groups be limited to the appropriate "side"
of the question, I would expect.
You didn't present any "appropriate side" of your question. If you
want to present the C code you are using and have questions about that
code, please do.
Please feel free to disagree ;-)

friendly greetings,

Erik


--
Al Balmer
Balmer Consulting
re************************@att.net
Nov 14 '05 #9
Erik wrote:
In my opinion, it is a question that crosses the blurred boundaries
between C, PHP, HTML and even MySQL.
Sorry, but you are incorrect. The newsgroup comp.lang.c deals only with
ISO standard C, not interfaces to other languages (because C has no
defined capabilities for that).

- maybe I need to work on the C-side interface, to make the connection
to PHP.
If you uncover a C problem to solve, AND it is one that can be
accomplished in standard C, then and only then should it be brougt up
here. There are no PHP interface facilities, so anything along these
lines comes first from the PHP solution, so that's where your initial
question belongs.
- How would the data-interfacing structures have to look...
PHP question, not a C question.
Maybe the answers will learn me, that I need not do anything to the
C-code. But only that **answer** would make this a non-C question and
therefor off-topic. The **question** is not.

A bit philosophical maybe, and yes: philosophy IS off-topic :-)


Nope. You have to start with PHP, not with C.

Brian Rodenborn
Nov 14 '05 #10

Nope. You have to start with PHP, not with C.


That is an answer which points me in the right direction or a
worthwhile direction, anyway.
and an answer that can only come from C-people...

Thanks for the enlightenment
Nov 14 '05 #11
Contradict all you like - the C standard says nothing about interfaces
to PHP. That is not to say that it can't be done, only that it
requires nonstandard extension, as Mark said.


No need to bark.

Many of the questions in this group are about home-built, non-standard
C-extensions...
Why? The php groups can have their own definition of topicality. This
group restricts its topic to standard C, which you would know if you
spent a reasonable amount of time reading the group before posting to
it.

My conclusion, sofar, is, that I will have to alter my C-code somewhat
and write some in-Standard-C interface-structures to get my data in...

That's why there are more general groups, such as comp.programming.

is like jumping into the ocean, instead of a bathtub....


You didn't present any "appropriate side" of your question. If you
want to present the C code you are using and have questions about that
code, please do.


There are even TWO appropriate sides to my question...
Nov 14 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Erik | last post by:
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...
4
by: Targa | last post by:
Trying to total some price fields in a form but doesnt work when all the referenced form fields dont exisit. This is for an invoice - pulled prom a database and the form doesnt always contain the...
11
by: lduperval | last post by:
Hi, I`m trying to do date calculations in three types of time zones: local, GMT and specified. The issue I am facing is that I need to be able to specify a date in the proper time zone, and I`m...
3
by: brian kaufmann | last post by:
Hi, I had sent this earlier, and would appreciate any suggestions on this. I need to make calculations for unemployment rate for three different data sources (A,B,C) for many countries and age...
3
by: John M | last post by:
Hi, I've been coming up against a failure of a report to display the result of a simple calculation. I have realised that this calculation cannot take place unless the field I am working on is...
0
by: SJM | last post by:
There is a database which has combo boxes to allow users to select values from pre-set lists of common specifications. The form allows users to enter values that are not in the dropdown lists....
0
by: A_PK | last post by:
Under the Deployment and Setup Project..... there are two Editor.... 1 - Userinterface Editor 2 - Registry Editor... I have created 2 new Forms with build it Four textbox... I just wonder how...
1
by: Grubsy4u | last post by:
Grubsy4u Newbie 7 Posts October 5th, 2007 11:31 AM #1 Report calculations --------------------------------------------------------------------------------
1
by: yogeshtiwarijbp | last post by:
Actually in Userinterface i have a form which contains a drop down list box in that reportname which is stored as a record is populated. After that when user clicks a report in ddl , the...
9
Catalyst159
by: Catalyst159 | last post by:
I have a form which is used to calculate residential Floor Area Ratio (FAR). The form is structured into seven parts as follows: Part A: Maximum FAR and Floor Area: Part B: Gross Floor Area of...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.