Mailinglisten-Archive |
This is a multi-part message in MIME format.
------=_NextPart_000_0093_01C0B2FA.A1492F30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
nabend ML,
es gibt ja die garbage-collection von den session-funktionen
und sowas =E4hnliches brauche ich auch.
------------------------------------------------------
srand((double)microtime()*1000000);
$random =3D rand(1 , 100);
$z =3D 100 - $percent;
if ($random > $z)
{
ausf=FChren
}
else
{
nicht ausf=FChren
}
------------------------------------------------------
es *scheint* zu funktionieren, doch muss dieser algorithmus ohne jeden =
bug
laufen und auch werte wie 1% akzeptieren.
deshalb meine fragen:
- bin ich damit auf dem richtigen weg ?
- k=F6nnt ihr da was verbessern ?
mfg
kai
------=_NextPart_000_0093_01C0B2FA.A1492F30
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>nabend ML,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>es gibt ja die garbage-collection von =
den=20
session-funktionen</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>und sowas =E4hnliches brauche ich =
auch.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2>------------------------------------------------------</FONT></D=
IV>
<DIV><FONT face=3DArial =
size=3D2>srand((double)microtime()*1000000);<BR>$random =3D=20
rand(1 , 100);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>$z =3D 100 - $percent;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>if ($random >=20
$z)<BR> {<BR> ausf=FChren</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2> }<BR>else<BR> {<BR> nicht=20
ausf=FChren</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> }</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>------------------------------------------------------</FONT></D=
IV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>es *scheint* zu funktionieren, doch =
muss dieser=20
algorithmus ohne jeden bug</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>laufen und auch werte wie 1%=20
akzeptieren.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>deshalb meine fragen:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>- bin ich damit auf dem richtigen =
weg=20
?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>- k=F6nnt ihr da was verbessern =
?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>mfg</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>kai</FONT></DIV></BODY></HTML>
------=_NextPart_000_0093_01C0B2FA.A1492F30--
php::bar PHP Wiki - Listenarchive