How to combine PHP and C language in webdevelopment.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • codexxx
    New Member
    • Jun 2007
    • 18

    How to combine PHP and C language in webdevelopment.

    Hi All,

    Very recently I will be involved in a php project where a huge traffic is expected . Though load balancing could be done by some tweaking in htaccess but I have also heard that C/C++ could be used to interact with database so that only front end could be made of PHP hence the site will be running faster and will be capable of handling lots of traffic.

    I wonder if it is possible to make such a system where C/C++ could be used as native code for working in the back end and php will just be working on the front end .

    Thanks in advance
    codexxx
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    all of PHP’s database code is practically running out of C/C++ (the language PHP is programmed in). you would be duplicating already existing PHP functionality.

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      I have no idea how to make PHP and C interact with one another, since all I ever needed is covered by PHP.

      if you have problems with the server load think about using a content delivery network (CDN).

      Comment

      • johny10151981
        Top Contributor
        • Jan 2010
        • 1059

        #4
        I dont get the idea of front end in php and back end in C.

        The back end(i have no idea what it is) is probably apache server, which has all the functionality manager HTTP server.

        But if you like to think this way, as example
        mpdf and PHPExcel are excellent tools for developing pdf and excel file. But they use huge memory.
        Both of them is made of completely PHP. because of written(I think this way, dont wanna argue) in PHP in case of big file server ran out of memory. And the so called big file is around 1Mega byte. But if those classes were made of c/c++ as extension the performance would be better. in that case i would say, yes you can get better performance...

        but if there is anything else in your mind then i am not sure what are you looking for.

        Comment

        Working...