THIS IS TAKEN DIRECTLY FROM TONTITO'S WEBSERVER SCRIPT!


This new type of files are based in Mhtml code that was implemented before by rkzad (thanks for all your patiente :p) but with some changes to work faster with my server.

The mhtml file format consists in a normal html file, but where we can add mirc script code by adding some 
  special tags here you have an example...

        >>>Sample code from index.mhtlm<<<
<html>
<head><title>mIRC Web Server</title></head>
<body bgcolor=white text=black link=blue alink=blue vlink=blue>
<font face=tahoma size=-1><center><img src=mws.png><br><br>
<!--mirc                                            <- here we notice the webserver that we are adding script code
  if ($isset(hello)) print Hello, $getform(hello) $+ !<br>
-->                                                 <- here we notice that the script code has finished
<table border=2 bordercolor=#DADADA cellpadding=0 cellspacing=0><tr><td bgcolor=#EAEAEA>  <- then continue with the html code

We can also include mhtml files insid of other mhtml files by doing
<!--inc include.mhtml            <- notices the webserver that we are including a new mhtml file
                                  (same format has before), if the files doesn't exist its like if it wasn't included

For this last case you don't need to close nothing since the <!-- and the --> are in the file include.
Included files must not have </html> or the page will not be what you plan!!!

You can add almost all type of mirc instructions in the mhtml code, but don't forget this code only runs in the 
    web server one example is this while loop

Nickname:<br>Address:<br>Idle:<br>Active channels:<br>Uptime:<br></font></div></td><td><font size=-1>
<!--mirc
  print $+($iif(!$server,Not Connected,$server),<br>,$me,<br>,$iif($server,$host,-),<br>,$duration($idle),<br>)
  if ($chan(0)) {
    var %num = $chan(0)
    while %num {
      print $chan(%num) $+ $iif(%num != 1,$chr(44))
      dec %num
    }
  }
  else print None
  print $+(<br>,$uptime(system,1))
-->
</font></td></tr></table></td></tr></table><br>

The PRINT command must be used if you want to write something in the html page that is going to be sent to 
  the user that requested it.

There are no more extra commands. If you need some more send me a mail explaining what you need.


OPTIMIZATIONS:
The script can run alot faster if you manage to group your html lines together but to a max of 850 bytes long!!
this way the script has less lines to read making less access to hd and the script can run can alot faster.
Script code can also be optimized like this, but don't forget to put | where they are needed
I know the file then gets lery ugly but its faster, so if you need to change it often keep a version
    with out the optimization :)

I provide a index.mhtml optimization (optimized.mhtml) for you to see, it takes 500 milis seconds less than index.mhtml
   (but this code cant be much optimized some codes can get alot faster...) 



Notice that to run this type of files you need some extra processing power, i recomend 
   at least 500Mz and 196MB ram
Also notice that antivirus software slow this type of processing like 
   hell (about 4 to 5 times slower)

No POST requests are yet allowed.
Hope the file can help you :)

Tontito

