msaa
asked on
HTML CODE IN C??
How can I insert an HTML code in a C program?? is that possible?
ASKER
I mean if I have any HTML code and I want to make the code run from an exe file without letting anyone know the source of it
HTML is a display language. Why would you want to run a display language that doesn't display?
ASKER
I have a code, I dont need to display anything I just want this code to run from an Exe is that possible or not!
You need to further explain what you mean. Perhaps give an example. HTML is made up of simple characters, so in that respect it could be contained within a C program as a character array.
ASKER
ok this is an HTML code which I want to run it from an executable program in C , I dont want to open an HTML file to run it I want it to be program.exe:
<html>
<head>
<meta http-equiv="Content-Langua ge" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor. Document">
<title>New Page 1</title>
</head>
<body>
<p>Hello world!!</p>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Langua
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.
<title>New Page 1</title>
</head>
<body>
<p>Hello world!!</p>
</body>
</html>
HTML is not "executable" -- as Kdo said, it's a static display language. You cannot run HTML, you can only use a browser to view an HTML file. It would be best to just write a batch file that opened the html file in a browser ... e.g.
-- Batch file:
"C:\Program Files\Internet Explorer\IExplore.exe" C:\YourFile.html
If you really want your C executable to display your HTML page in a browser then look into the system() method, and make the same call you would make from the batch file.
system( "IExplore.exe C:\YourFile.html" );
-- Batch file:
"C:\Program Files\Internet Explorer\IExplore.exe" C:\YourFile.html
If you really want your C executable to display your HTML page in a browser then look into the system() method, and make the same call you would make from the batch file.
system( "IExplore.exe C:\YourFile.html" );
ASKER
Well I dont know what to say but this is not what I wanted.. I saw some programs which runs html files without including them on the system.. they will just run from the exe.. maybe they were done with VB?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you Timbo!
What do you mean by insert?