Like Tree1Likes
  • 1 Post By laserlight

C++ in websites?

This is a discussion on C++ in websites? within the C++ Programming forums, part of the General Programming Boards category; In wikipedia, i typed - Facebook.com and a page came, In that it was written- "Programmed in C++ and PHP". ...

  1. #1
    Registered User
    Join Date
    Jul 2012
    Posts
    36

    C++ in websites?

    In wikipedia, i typed - Facebook.com and a page came, In that it was written- "Programmed in C++ and PHP". if it would be java and php i wouldn't be surprised, as java can be used for web programming as well. but c++? well, even if he made a program in c++ (by he, i mean Zuck). how did he incorporate it in his website?


    kindly help...

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,145
    Probably some backend code called through PHP. Or CGI.

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,976
    Facebook's PHP code is translated to C++ as an optimisation: HipHop for PHP
    Crossfire likes this.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #4
    Registered User
    Join Date
    Nov 2012
    Posts
    985
    PHP also allows you to write extensions which are modules loaded at runtime of the interpreter. These are generally written in C or C++. Here is an article which describes this

    DevZone Wrapping C++ Classes in a PHP Extension

    So basically you would end up with a PHP application where you can use your useful classes that you've written in C++ which are also compiled/optimised to run natively on the server.

    Also for option 2 you can use straight C++ to generate web pages. There's an interesting toolkit here which helps you do it: Wt, C++ Web Toolkit

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ and Websites
    By c13catchings24 in forum C Programming
    Replies: 1
    Last Post: 12-08-2011, 10:29 PM
  2. c++ on websites
    By bijan311 in forum C++ Programming
    Replies: 3
    Last Post: 02-14-2010, 05:04 PM
  3. Great websites for C
    By KoG Metalgod in forum C Programming
    Replies: 15
    Last Post: 12-05-2006, 09:52 PM
  4. Your Websites
    By St0rmTroop3er in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 10-05-2003, 12:22 PM
  5. Websites
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 12-27-2001, 08:10 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21