Jump to content

PHP cross programming language communication?


hakermania

Recommended Posts

Hello!

I'm making a program in C++ which has some variables that I need to show inside my .php page.

 

So, I have 2 main questions

1) Is there a possible way to detect when my .php page is being requested

2) After this to inform the C++ program that the page is being requested (editing a file or writing to files would be preferable to be avoided)

and

3) After this the C++ program to give to php the variables that I want to show (again writing to files isn't preferable)

 

Perhaps question (3) is not for these forums, but I'd like to know if someone has an idea about the issue....

 

Unfortunately I have the impression that PHP is a simple script language and cannot do s0 high-level things...

Prove me wrong, please ;)

Link to comment
Share on other sites

PHP is way more than a scripting language, I know companies that write large programs in PHP just because of its easy syntax and because many programmers know how to code in PHP. ;)

 

But can't you achieve your goal just by executing a C++ program on your server? You can easily do that in PHP with the exec() function (or passthru() if you need binary data)...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.