Use PHP and ACCESS to write chat rooms (10)
Last Update:2018-03-13
Source: Internet
Author: User
Use PHP and ACCESS to write chat rooms (10) func. php3
The code is as follows:
Function suiji ($ max)
{
Srand (double) microtime () * 1000000 );
$ X = rand ();
$ Y = getrandmax ();
$ R = $ x/$ y * ($ MAX-1 );
$ R = round ($ r ++ );
Return $ r;
}
Function StrOccurs ($ sStr, $ sFind ){
$ STemp = $ sStr;
$ ILen = strlen ($ sFind );
$ ICount = 0;
While (true ){
If (strstr ($ sTemp, $ sFind ))
Break;
Else
$ STemp = instr ($ sTemp, strpos ($ sTemp, $ sFind) + $ iLen );
$ ICount ++;
}
}
Return $ iCount;
}
Function StrDupl ($ sStr, $ iCnt ){
$ Ret = "";
For ($ I = 1; $ I <= $ iCnt; $ I ++)
$ Ret. = $ sStr;
Return $ ret;
}
Function DelQuot ($ sStr ){
$ S = str_replace (chr (124), "success", $ sStr );
$ S = str_replace (chr (39), "'", $ s );
$ S = str_replace (chr (34), "", $ s );
Return s;
}
Function DelTag ($ sStr ){
$ BNeed = "False ";
$ SOther = strtoupper ($ sStr );
If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther, "if ($ bNeed! = "True" |! Strstr ($ sOther ,"If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther, "FONT-SIZE:") $ bNeed = "True ";
If ($ bNeed = "True ")
Return str_replace (">", ">", str_replace ("<", "<", $ sStr ));
Else
Return $ sStr;
}
Function AddLost ($ sStr ){
$ Ret = $ sStr;
$ Ret. = StrDupl (">", (StrOccurs (strtoupper ($ ret), "<")-StrOccurs (strtoupper ($ ret), "> ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret ),"")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," ")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," $ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret )," $ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret ),"")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret ),"")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret ),"")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret ),"")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret ),"")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret ),"")));
$ Ret. = StrDupl ("", (StrOccurs (strtoupper ($ ret ),"")));
Return $ ret;
}
?>
[This article is copyrighted by the author and osuo. if you need to reprint it, please indicate the author and its source]