Thread: HTML Output

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    2

    Question HTML Output

    Does anyone know of any C libraries to produce HTML output. In an ideal world it would be like the curses library but instead of producing terminal output it would produce HTML output.

  2. #2
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    you can do it yourself,
    create a file as normal and ouput to it including the html tags, then save it with a .htm filename - !
    simple - this works 0 i have done it before my self - so if you want an eg of source code just ask.

    edit---
    unless i misunderstood the question and you want to produce it on the screen....
    __
    Monday - what a way to spend a seventh of your life

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    2
    If you have example code - excellent. It would get me started.


    Thanks,


    Ray

  4. #4
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,212
    Code:
    #include <stdio.h>
    
    int main( void )
    {
     FILE *myhtmlfile = fopen("new.html", "w"); // open the file
     fprintf(myhtmlfile,"<HTML><BODY>\n");
     fprintf(myhtmlfile,"<font size=\"5\">Hello, world</font></body></html>");
     fclose(myhtmlfile); // close the file
     system("iexplore new.html"); // open internet explorer to test the page
    }
    Please note this code has not been tested because I just reinstalled and my compiler hasn't been setup yet.

  5. #5
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    oh (sad disappointed face)

    i was just about to post my code - ah well
    if you still want it just let me know
    Monday - what a way to spend a seventh of your life

  6. #6
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,212
    Go on, post it, it's better, I know it. It might teach us something.

  7. #7
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    ok, i wrote this a full app for freeware release
    ignore all the copyrigh bs, cut hack it eat whatever
    Monday - what a way to spend a seventh of your life

  8. #8
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,212
    Hehe, I'm working on a menu system for my maze game...it owns your menu system :P.

  9. #9
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    if you want the source for only the menu i can post that
    Monday - what a way to spend a seventh of your life

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. code output...
    By roaan in forum C Programming
    Replies: 6
    Last Post: 07-03-2009, 02:22 AM
  2. Help for my output array
    By qwertysingh in forum C Programming
    Replies: 1
    Last Post: 02-17-2009, 03:08 PM
  3. execl()/fork() output
    By tadams in forum C Programming
    Replies: 19
    Last Post: 02-04-2009, 03:29 PM
  4. Output problems with structures
    By Gkitty in forum C Programming
    Replies: 1
    Last Post: 12-16-2002, 05:27 AM
  5. Design + HTML
    By orbitz in forum C Programming
    Replies: 8
    Last Post: 11-21-2002, 06:32 AM