program | Dynamic ASP dynamically generate Wbmp picture program
(ASP2001)
<%@ Language=vbscript%>
<%
' Function 1:
' Converts a string into a binary
Function Stob (VARSTR)
Str2bin = ""
For i = 1 to Len (VARSTR)
varchar = Mid (VARSTR, I, 1)
Str2bin = Str2bin & ChrB (AscB (varchar))
Next
Stob = Str2bin
End Function
' Function 2:
' "&h" in front of every two characters is hexadecimal, then "&h??" Add to "Chr ()" Inside
' What is the specific function, I also can not tell, anyway is necessary
Function SS (VARSTR)
BB = ""
For i = 1 to Len (VARSTR)/2
varchar = "&h" & Mid (Varstr, 2*i-1, 2)
BB=BB & chr (varchar)
Next
SS = BB
End Function
Img= " 00001414faf5f0fb6df0fbadf0fbdd801bfc70e71fe07ce7d0bbfbd0dbfbb0d7fd70b7fdb077f5d0fbebe0fbdbf01ce780c71c70f7fdf0f7bff0f65df 0f5edf00 "
' The meaning of this string refers to my previous post
' Of course, it can be automatically generated by the program based on data this string, if you understand the meaning of this string and have enough patience, think about it, generate a 100x100
Picture, to be composed of 1250 characters similar to "F0"!
Response.contenttype= "Image/vnd.wap.wbmp"
Response.BinaryWrite Stob (SS (IMG))
' Try it, it seems not very much like the sun, simple how to say is the pattern of the sun, perhaps his ability to draw is worse:%>