<%
dim SJID
Function GetRamCode(f_number)
Randomize
Dim f_Randchar,f_Randchararr,f_RandLen,f_Randomizecode,f_iR
f_Randchar="1|2|3|4|5|6|7|8|9|0"
f_Randchararr=split(f_Randchar,"|")
for f_iR=1 to f_number
f_Randomizecode=f_Randomizecode&f_Randchararr(Int((10*Rnd)))
next
GetRamCode = f_Randomizecode
SJID=GetRamCode
'response.Write (SJID)
if SJID<>"" then
set rs=server.createobject("adodb.recordset")
sql="select * from ping where PID like '%"&SJID&"%'"
rs.open sql,conn,1,3
if not(rs.eof or rs.bof) then
rs.close
set rs=nothing
call GetRamCode(5)
end if
end if
End Function
call GetRamCode(5)
response.Write (SJID)
%>