Use PHP and ACCESS to write chat rooms (10)

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]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.