Robert wrote:[color=blue]
> I was wondering if there was any web server which supported the use of
> c++ as a server side method for creating dynamic web pages. Is this
> viable, or should I just bite the bullet and learn a server-side
> scripting language like php?
>[/color]
-- Thanks in advance
In the MS world you can do it with "ATL server" of IIS in this style:
You create a class with methods and you assign each method a keyword
called tag.
Then in a SRF file (which is the ATL Server dynamic file) you write HTML
and inside it you use those keywords, which are replaced with outputs of
method calls when the page is called through a browser.
An example. The C++ file:
#include <ctime>
class whatever
{
// ...
public:
[tag_name(name="GetDate")]
HTTP_CODE OnGetDate()
{
using namespace std;
time_t theTime;
time(&theTime);
m_HttpResponse<<ctime(&theTime);
return HTTP_SUCCESS;
}
// ...
};
The SRF file:
<html>
<HEAD>
</HEAD>
<BODY>
{{handler whatever.dll/Default}}
<h2>Time Server</h2>
The current date and time is: {{GetDate}}
</BODY>
</html>
The {{GetDate}} above is replaced with the output passed to
m_HttpResponse object.
Regards,
Ioannis Vranos
http://www23.brinkster.com/noicys