Use PHP and access to write a chat room (10) _php Tutorial

Source: Internet
Author: User
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), "¦", $SSTR);
$s =str_replace (Chr (39), "´", $s);
$s =str_replace (CHR), "" ", $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 document is owned by the author and the house Orso near network, please specify the author and the source if you want to reprint"


http://www.bkjia.com/phpjc/316531.html www.bkjia.com true http://www.bkjia.com/phpjc/316531.html techarticle FUNC.PHP3 code as follows:? PHP function Suiji ($max) {srand (double) microtime () *1000000), $x =rand (); $y =getrandmax (); $r = $x/$y * ($max-1); $r =round ($r + +); return $r; } function Strocc ...

  • 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.