Invoking php from C++ code

This is a discussion on Invoking php from C++ code within the PHP Language forums, part of the PHP Programming Forums category; Hi. I have to write a C++ code that invokes a set of SQL statements (inserts, updates, selects etc.), according ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-26-2004
Michal O
 
Posts: n/a
Default Invoking php from C++ code

Hi.
I have to write a C++ code that invokes a set of SQL statements
(inserts, updates, selects etc.),
according to the system administrator's directives.

I thought of writing the directives as a php script.

Can I execute php functions from a C++ code?
The php script writer should be able to access informaion from the C++ program,
and the C++ program should receive php execution results.
Is this possible?
How?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 09-26-2004
rush
 
Posts: n/a
Default Re: Invoking php from C++ code

"Michal O" <michalo@gmail.com> wrote in message
news:4612f134.0409260126.4295e553@posting.google.c om...
> Hi.
> I have to write a C++ code that invokes a set of SQL statements
> (inserts, updates, selects etc.),
> according to the system administrator's directives.
>
> I thought of writing the directives as a php script.
>
> Can I execute php functions from a C++ code?
> The php script writer should be able to access informaion from the C++

program,
> and the C++ program should receive php execution results.
> Is this possible?
> How?


in theory you could use SAPI (server api) to create from your C program
enviroment that minics web server to php. But I do not think this would be
worthwile to do all that just to execute a few queries.

rush
--
http://www.templatetamer.com/


Reply With Quote
  #3 (permalink)  
Old 10-09-2004
DvDmanDT
 
Posts: n/a
Default Re: Invoking php from C++ code

Possible, yes.. You'd just create a new SAPI.. Which doesn't seem tooo hard
if you look at some of the sources.. However, I truly doubt it would be
worth the trouble.. I also suppose you could run the cgi exe and pass the
data needed by the script as cgi parameters or whatever they are called...
But to be honest, I think it'll be easier to just stick to C++..

--
// DvDmanDT
MSN: dvdmandt€hotmail.com
Mail: dvdmandt€telia.com
"Michal O" <michalo@gmail.com> skrev i meddelandet
news:4612f134.0409260126.4295e553@posting.google.c om...
> Hi.
> I have to write a C++ code that invokes a set of SQL statements
> (inserts, updates, selects etc.),
> according to the system administrator's directives.
>
> I thought of writing the directives as a php script.
>
> Can I execute php functions from a C++ code?
> The php script writer should be able to access informaion from the C++

program,
> and the C++ program should receive php execution results.
> Is this possible?
> How?
>
> Thanks.



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:35 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0