Recommended: Check pages in ASP without data submissions Users often encounter some annoying information when visiting a site, such as they often somehow arrive at the next page without actually submitting data to the form, or often reach a page, which is transferred in the form of a query string, such as?ID=236454. like
After I wrote the article "Implementing the Whispering Function in the Asp Chat Room", many friends wrote to me to ask me questions about the implementation of other advanced functions. Indeed, advanced functions such as room and user management are essential functions for a complete chat room. It is difficult to achieve the function of the room here. Therefore, I want to talk to you about this issue.
I still tend to use arrays to solve these two problems. This is not to say that it cannot be solved with databases, but we need to consider performance issues. Moreover, using arrays has several benefits, which are conducive to sorting and controlling the total length. Staying in server memory (promoting performance improvement). Let me first talk about the room issue. Here we will give you the method of switching between two system rooms. As for the method of building your own room, I hope everyone can understand it. There are also questions about user online display, because we need to display users and total users in each room, so we will have some interaction with the room. Please pay attention when talking. For the convenience of everyone's use, I try to write these functions into subprograms or subfunctions, so that everyone can directly apply them.
Let's first look at the definition in gloable.asa, which is very important.
| The following is the quoted content: <SCRIPT LANGUAGE=VBScript RUNAT=Server> Sub Application_OnStart() application(gRoom_Name)=Xiaoyaoyou'Save the name of the main chat room, the chat room that everyone will visit first dim pChat_Value(50) application(application(gRoom_Name)&_Value)=pChat_Value 'p represents private g represents globle used to save the content of Xiaoyaoyou chat room application(application(gRoom_Name)&_Number)=0 'The number of conversations used to save the Xiaoyaoyou chat room application(Health Master&_Value)=pChat_Value application(Health Master&_Number)=0 dim pChater_Value(150) application(application(gRoom_Name)&er_Value)=pChater_Value 'The name of the chatter used to save the Xiaoyaoyou chat room application(application(gRoom_Name)&er_Number)=0 'Use to indicate the number of people who are online in Xiaoyaoyou chat room application(Health Master&er_Value)=pChater_Value application(Health Master&er_Number)=0 dim pRoom_Value(50) pRoom_Value(0)=Xiaoyaoyou&(&System&)&[&application(application(gRoom_Name)&er_Number)&]& person pRoom_Value(1)=Health Master&(&System&)&[&application(Health Master&er_Number)&]& People application(gRoom_Value)=pRoom_Value 'used to save the name of the room application(gRoom_Number)=2 End Sub Sub Session_OnStart() session(sRoom_Name)=application(gRoom_Name)'Default room for each new user session(sChater_Name)= 's represents session used to save the speaker's name strProvider=Driver={Microsoft Access Driver (*.mdb)}; DBQ=&server.mappath(../chat)&/&db/Chater_Message.mdb; set Cres=server.createobject(ADODB.Connection) set res=server.createobject(ADODB.Recordset) Cres.open strProvider res.activeconnection=Cres set session(res)=res 'An instance of Recordset End Sub |
Share: The ultimate disguise of ASP backdoor I remember the Trojan horse that claimed to have never been killed when the asp Trojan came out. Haha, to this day, any antivirus software can kill it without leaving any armor^_^ Haha, due to the idea of changing the Trojan shell to avoid antivirus software, we can also give the Trojan horse a try.
3 pages in total Previous page 123 Next page