Stand-alone Web-application?

Sure it is possible -- if you can write an OS with C, you can write a web server and application. It'll just be a lot more work.

Sure it is possible -- if you can write an OS with C, you can write a web server and application. It'll just be a lot more work. Here's an example C web server with only 200 lines of code.

– Majid Fouladpour Jan 15 '10 at 17:18 Posted an example link.It only servers static pages however, so you might need to google for something a bit more robust. – Kaleb Brasee Jan 15 '10 at 17:21 Thanks Kaleb. Will try it.

– Majid Fouladpour Jan 15 '10 at 17:28 For . Net, it might work to use the new IIS Express webserver: weblogs.asp. Net/scottgu/archive/2010/06/28/… – David Jan 15 '10 at 20:51.

Sure you could write one yourself. The HTTP protocol is vast but you don't have to be a fully compliant web server to run your own application. The C application would have to listen to requests on whatever port you decide to run the server at (default 80).

There are various request methods in HTTP, but at a minimum you would have to implement GET, or maybe even POST but that aspect you can control since its your web application. Here's an example of a basic request that you C program should parse: GET /index. Html HTTP/1.1 Host: example.com And return a response with the requested content and response headers, such as: HTTP/1.1 200 OK Date: Mon, 23 May 2005 22:38:34 GMT Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux) Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT Etag: "3f80f-1b6-3e1cb03b" Accept-Ranges: bytes Content-Length: 438 Connection: close Content-Type: text/html; charset=UTF-8 I may have already mentioned this but the HTTP protocol is really vast.

Browsers with varying capabilities could access the site, and you would have to respond accordingly. Having said that, since it's all under your control, you could start small with perhaps a small subset of the requests/headers you'd like to handle, single-threaded, one request at a time, etc. And then build it out from there. Like Kaleb said if C can be used in OS's and spaceships, then we can definitely write a web and application server with it :).

I just hiphop-php which could be used for this purpose. Here is what they say about it: pHop for PHP transforms PHP source code into highly optimized C++. It was developed by Facebook and was released as open source in early 2010.It could be accessed here.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions