Up.htm
<HTML>
<Body>
<Form action = "Up. asp" enctype = "multipart/form-Data" method = "Post">
<Table border = 0 width = 100% cellspacing = "0">
<Tr>
<TD width = "30%"> select the GIF image you want to upload: </TD>
<TD width = "70%"> <input type = "file" name = "pic" style = "font-size: 10pt;"> </TD>
</Tr>
</Table>
<P align = "center"> <input type = "Submit" value = "Submit" style = "font-size: 9pt; Background-color: #54b060; color: white; ">
</Form>
</Body>
</Html>
Up. asp
<%
Formsize = request. totalbytes
Formdata = request. binaryread (formsize)
Bncrlf = chrb (13) & chrb (10)
Divider = leftb (formdata, Role B (formdata, bncrlf)-1)
Datastart = instrb (formdata, bncrlf & bncrlf) + 4
Dataend = Consumer B (datastart + 1, formdata, divider)-datastart
Image = midb (formdata, datastart, dataend)
Head_version = ASCB (midb (image, 1, 3 ))
Head_subversion = ASCB (midb (image, 4, 3 ))
Head_width_l = ASCB (midb (image, 7,1 ))
Head_width_h = ASCB (midb (image, 8, 1 ))
Head_height_l = ASCB (midb (image, 9, 1 ))
Head_height_h = ASCB (midb (image, 10, 1 ))
Head_colors = ASCB (midb (image, 11, 1 ))
Head_width_h = head_width_h * 256
Head_height_h = head_height_h * 256
Head_colors = head_colors and & h07
Response. write "the image size is" & head_width_h + head_width_l & "X" & head_height_h + head_height_l _
& "X" & 2 ^ (head_colors + 1)
%>