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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • x0054

    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
  • Ian Collins

    #2
    Re: Integrating PHP and C++ or ASM for web applications?

    x0054 wrote:[color=blue]
    > 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.
    >[/color]
    You're talking about a PHP extension.
    [color=blue]
    > 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.
    >[/color]
    Have a look at



    --
    Ian Collins.

    Comment

    • x0054

      #3
      Re: Integrating PHP and C++ or ASM for web applications?

      Ian Collins <ian-news@hotmail.co m> wrote in
      news:1142922872 .905376@drone2-svc-skyt.qsi.net.nz :
      [color=blue]
      > x0054 wrote:[color=green]
      >> 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.
      >>[/color]
      > You're talking about a PHP extension.
      >[color=green]
      >> 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.
      >>[/color]
      > Have a look at
      >
      > http://www.zend.com/php/internals/ex...n-writing1.php
      >[/color]

      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

      Comment

      • Treefrog

        #4
        Re: Integrating PHP and C++ or ASM for web applications?

        >[color=blue]
        > 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.[/color]

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



        Comment

        • Ian Collins

          #5
          Re: Integrating PHP and C++ or ASM for web applications?

          Treefrog wrote:[color=blue][color=green]
          >>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.[/color]
          >
          >
          > No No, write a library in C++ then use PHP's COM support to get the
          > data. Easy peasy.
          >[/color]
          If you happen to be running windows?

          --
          Ian Collins.

          Comment

          • Treefrog

            #6
            Re: Integrating PHP and C++ or ASM for web applications?

            > > No No, write a library in C++ then use PHP's COM support to get the[color=blue][color=green]
            > > data. Easy peasy.
            > >[/color]
            > If you happen to be running windows?[/color]

            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?

            Comment

            • x0054

              #7
              Re: Integrating PHP and C++ or ASM for web applications?

              "Treefrog" <info@designste in.co.uk> wrote in news:1142947835 .764183.173710
              @g10g2000cwb.go oglegroups.com:
              [color=blue][color=green][color=darkred]
              >> > No No, write a library in C++ then use PHP's COM support to get the
              >> > data. Easy peasy.
              >> >[/color]
              >> If you happen to be running windows?[/color]
              >
              > 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?
              >[/color]

              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

              Comment

              Working...