473,387 Members | 1,520 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.

Integrating PHP and C++ or ASM for web applications?

I am simply experimenting in this area, but are there any tutorials on
integrating C++ or ASM binaries with PHP? For instance, I have an
application in PHP that reads a rather large matrix of data from a
database and then needs to structure it into a tree. Well, it works fine
in PHP, but it would be a lot faster in C++. I was thinking of exporting
the tree function to C++ so that I would have a faster execution time of
my PHP script.

Is there a way to have like a function type interface in PHP to a binary
without writing a PHP module and installing it on a system? Other then the
obvious, just using standard output/input.

Thanks for any help,

- Bogdan
Mar 21 '06 #1
6 5490
x0054 wrote:
I am simply experimenting in this area, but are there any tutorials on
integrating C++ or ASM binaries with PHP? For instance, I have an
application in PHP that reads a rather large matrix of data from a
database and then needs to structure it into a tree. Well, it works fine
in PHP, but it would be a lot faster in C++. I was thinking of exporting
the tree function to C++ so that I would have a faster execution time of
my PHP script.
You're talking about a PHP extension.
Is there a way to have like a function type interface in PHP to a binary
without writing a PHP module and installing it on a system? Other then the
obvious, just using standard output/input.

Have a look at

http://www.zend.com/php/internals/ex...n-writing1.php

--
Ian Collins.
Mar 21 '06 #2
Ian Collins <ia******@hotmail.com> wrote in
news:11***************@drone2-svc-skyt.qsi.net.nz:
x0054 wrote:
I am simply experimenting in this area, but are there any tutorials
on integrating C++ or ASM binaries with PHP? For instance, I have an
application in PHP that reads a rather large matrix of data from a
database and then needs to structure it into a tree. Well, it works
fine in PHP, but it would be a lot faster in C++. I was thinking of
exporting the tree function to C++ so that I would have a faster
execution time of my PHP script.

You're talking about a PHP extension.
Is there a way to have like a function type interface in PHP to a
binary without writing a PHP module and installing it on a system?
Other then the obvious, just using standard output/input.

Have a look at

http://www.zend.com/php/internals/ex...n-writing1.php


Thank you, I think I may try that. I was looking though for something that
does not need to be directly installed into the PHP tree. Like a
standalawn binary that php can interact with. But I guess the only way to
do that would be through standard output. I think I'll just try writing an
extension.

- Bogdan
Mar 21 '06 #3
>
Thank you, I think I may try that. I was looking though for something that
does not need to be directly installed into the PHP tree. Like a
standalawn binary that php can interact with. But I guess the only way to
do that would be through standard output. I think I'll just try writing an
extension.


No No, write a library in C++ then use PHP's COM support to get the
data. Easy peasy.

http://uk.php.net/manual/en/class.com.php

Mar 21 '06 #4
Treefrog wrote:
Thank you, I think I may try that. I was looking though for something that
does not need to be directly installed into the PHP tree. Like a
standalawn binary that php can interact with. But I guess the only way to
do that would be through standard output. I think I'll just try writing an
extension.

No No, write a library in C++ then use PHP's COM support to get the
data. Easy peasy.

If you happen to be running windows?

--
Ian Collins.
Mar 21 '06 #5
> > No No, write a library in C++ then use PHP's COM support to get the
data. Easy peasy.

If you happen to be running windows?


Oh yeah, I forget about Linux these days.. I think there are a couple
of CORBA libs for PHP 4 and 5... that does the same(ish) thing, doesn't
it?

Mar 21 '06 #6
"Treefrog" <in**@designstein.co.uk> wrote in news:1142947835.764183.173710
@g10g2000cwb.googlegroups.com:
> No No, write a library in C++ then use PHP's COM support to get the
> data. Easy peasy.
>

If you happen to be running windows?


Oh yeah, I forget about Linux these days.. I think there are a couple
of CORBA libs for PHP 4 and 5... that does the same(ish) thing, doesn't
it?


I am running Linux. I will google that, see if I can find any tutorials.
If some posts a link, that would be grate.

Thank you,

- Bogdan
Mar 21 '06 #7

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

Similar topics

1
by: Ben Sizer | last post by:
I know the conventional wisdom is to write the whole app in Python and only extend with C++ where speed is an issue, but I already have a large C++ app that I'd like to add Python to. Ideally I'd...
3
by: Sonoman | last post by:
Hi all: Is there a class or function that I could use to integrate? By integrating , I mean calculus integration. I need to get data from a sensor that gives me the acceleration of an object. In...
2
by: George Durzi | last post by:
I'd like to get some real world feedback from developers out there who have to work with the "design" folks to integrate look and feel stuff into a vs.net web project. A lot of designers use web...
1
by: ayende | last post by:
I want to use Cuyahoga as my CMS, so I place it on the root of the site. I also have a dasBlog on the /Blog/ directory. Both the root & the /Blog/ directory are IIS applications. Each of those...
3
by: Lucas Tam | last post by:
Hi all, Assuming I've built a windows form application... how do I connect it to a web service? All the examples of web services I've seen pertain to stand alone applications. Basically,...
4
by: karpagam | last post by:
Since WebServices are a standardized way to invoke a method of another application over the internet, is there a way to integrate two different applications running on different platforms (Say a...
4
by: Jason Madison | last post by:
I would like to create a .net application that still uses a few screens from an old legacy application we have. I can list records from the database in my .net app, but when it comes to making...
7
by: Protoman | last post by:
Is this an efficient way to integrate an explicit function of x from a to b: #include <iostream> using namespace std; class Integrate { public: Integrate(long double (*f)(long double&...
2
by: lanlife | last post by:
Hello all i am just posting for the first time.I had a challenge at hand, i am thinking of integrating two already made php applications.In this case one will be the main application that get data...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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.