Thread: C++ in websites?

  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,229
    Probably some backend code called through PHP. Or CGI.

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Facebook's PHP code is translated to C++ as an optimisation: HipHop for PHP
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #4
    Registered User
    Join Date
    Nov 2012
    Posts
    1,393
    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, 11:29 PM
  2. c++ on websites
    By bijan311 in forum C++ Programming
    Replies: 3
    Last Post: 02-14-2010, 06:04 PM
  3. Great websites for C
    By KoG Metalgod in forum C Programming
    Replies: 15
    Last Post: 12-05-2006, 10: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, 09:10 AM