div> td>
TR>
TABLE>
form> td>
TR>
TABLE>
body>
html>
'//send.asp
<%
Function CHAN_TIME (Shijian) 'Conversion Date Time Function
S_Year = Year (shijian)
if Len (S_Year) = 2 Then S_Year = "20" & S_Year
S_Month = Month (shijian)
IF S_MONTH <10 THEN S_MONTH = "0" & S_Month
s_day = day (shijian)
IF S_DAY <10 THEN S_DAY = "0" & S_DAY
S_HOUR = Hour (shijian) if S_Hour <10 TEN S_HOUR = "0" & S_HOUR
S_minute = minute (shijian)
IF S_MINUTE <10 THEN S_MINUTE = "0" & S_Minute
CHAN_TIME = S_Year & S_Month & S_Day & S_HOUR & S_MINUTE
END FUNCTION
Function CHAN_DATA (shijian) 'conversion date time function
S_Year = Year (shijian)
if Len (S_Year) = 2 Then S_Year = "20" & S_Year
S_Month = Month (shijian)
IF S_MONTH <10 THEN S_MONTH = "0" & S_Month
s_day = day (shijian)
IF S_DAY <10 THEN S_DAY = "0" & S_DAY
CHAN_DATA = S_Year & S_MONTH & S_DAY
END FUNCTION
Function Chan_File (Shijian) 'Conversion Date Time Function
S_Month = Month (shijian)
IF S_MONTH <10 THEN S_MONTH = "0" & S_Month
s_day = day (shijian)
IF S_DAY <10 THEN S_DAY = "0" & S_DAY
S_Hour = Hour (shijian)
IF S_HOUR <10 TEN S_HOUR = "0" & S_HOUR
S_minute = minute (shijian)
IF S_MINUTE <10 THEN S_MINUTE = "0" & S_Minute
s_ss = second (shijian)
IF S_SS <10 THEN S_SS = "0" & S_SS
CHAN_FILE = S_MONTH & S_DAY & S_HOUR & S_MINUTE & S_SS
END FUNCTION
TOP = "
news title> head> "
Botom = " body> html>"
MSG = Request.form ("MSG")
MSG = Replace (MSG, VBCRLF, ")
Msg = Replace (MSG, ChR (9), "")
Msg = Replace (MSG, "," ")
Msg = Replace (MSG, "/ R / N", "
")
MSG = Replace (MSG, "/ N", "
")
MSG = TOP & MSG & BOTOM
SET FS = Server.createObject ("scripting.filesystemobject")
All_tree2 = server.mappath ("news") & "/" & chan_data (now) if (fs.folderexists (all_tree2)) Then 'determines whether today's folder exists
Else
fs.createfolder (all_tree2)
END IF
Pass = CHAN_FILE (NOW)
Randomize 'uses the system timer to initialize the chaos generator
Pass = rND (pass)
Pass = get_pass (pass)
Pass = Left (pass, 10) file1 = pass
Files = file1 & ". txt"
Filez = all_tree2 & "/" & files
Set ts = fs.createtextFile (filez, true) 'write files
For z = 1 to Len (MSG)
Write_now = MID (MSG, Z, 1)
Ts.write (Write_Now)
NEXT
'Ts.WriteLine (all_msg)
Ts.close
SET TS = Nothing 'file generation
IF err.number <> 0 or err Then%>
Alert ("cannot be done")
script>
<% ELSE%>
Alert ("Completed")
History.back ();
script>
<% end if
Set myfile = fs.getfile (filez)
All_tree2 = server.mappath ("news") & "/" & chan_data (now)
IF (fs.folderexists (all_tree2)) THEN
Else
fs.createfolder (all_tree2)
END IF
Myfile.name = left (myfile.name, len (myfile.name) -4) & ". Htm"
Set myfile = Nothing
SET FS = Nothing
Set fdir = Nothing
Function Get_Pass (Pass)
Pass = CSTR (PASS)
Pass = replace (pass, "," ")
Pass = replace (pass, "," ")
Pass = replace (pass, "-", "")
Pass = replace (pass, "," ")
Pass = replace (pass, ":", "")
Pass = replace (pass, ".", "")
Pass = Replace (Pass, " ", "" "
Pass = Replace (Pass, "_", "")
Pass = Replace (Pass, "<", "")
Pass = replace (pass, ">," ")
Pass = replace (pass, "!", "") pass = replace (pass, "@", "")
Pass = Replace (Pass, "#", "")
Pass = replace (Pass, "$", "")
Pass = replace (pass, "%", "" "
Pass = Replace (Pass, "^", "")
Pass = Replace (Pass, "&", "")
Pass = replace (pass, "*", "")
Pass = replace (pass, "(", ")
Pass = replace (pass, ")", "" "
Pass = replace (pass, "=", "")
Pass = replace (pass, "/", "")
Pass = replace (pass, "/", "")
Pass = replace (pass, "|," ")
GET_PASS = Pass
END FUNCTION
%>
'//
Put Send.asp and Index.htm in your ASP directory and build a news folder. Open the browser and enter in the address bar:
http: // Your machine name / your ASP virtual directory name /index.html Enter text, then submit, ok! Look at the newly built News folder in your ASP directory, it is not named by the current date. There is a text you just submitted to see if it generates an HTML file. How, you can do a simple news distribution system on this basis. .