boredom
Thomas - 24/11/2006 16:47
Moderator
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body style="background-color: #000">
<?php
$x = 512;
$y = 384;
$to = 200;
$mult = 5;
for($r=0; $r < $to; $r++)
{
// positie
$left = $x + (int) (sin(deg2rad($r * $mult)) * $r * $mult/2);
$top = $y + (int) (cos(deg2rad($r * $mult)) * $r * $mult/2);
// kleur
$rd = str_pad(dechex($r), 2, "0", STR_PAD_LEFT);
$gr = "00";
$bl = str_pad(dechex($to - $r), 2, "0", STR_PAD_LEFT);
// textgrootte
$t = number_format(5 + ($r/$to) * 50, 1);
?>
<div style="position: absolute; left: <?= $left ?>px; top: <?= $top ?>px; color: #<?= $rd.$gr.$bl ?>; font-size: <?= $t ?>pt">w00t</div>
<?php
}
?>
</body>
</html>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body style="background-color: #000">
<?php
$x = 512 ;
$y = 384 ;
$to = 200 ;
$mult = 5 ;
for ( $r = 0 ; $r < $to ; $r ++ )
{
// positie
$left = $x + ( int
) ( sin ( deg2rad ( $r * $mult ) ) * $r * $mult / 2 ) ; $top = $y + ( int
) ( cos ( deg2rad ( $r * $mult ) ) * $r * $mult / 2 ) ;
// kleur
$gr = "00" ;
// textgrootte
?>
<div style="position: absolute; left: <?= $left ?> px; top: <?= $top ?> px; color: #<?= $rd . $gr . $bl ?> ; font-size: <?= $t ?> pt">w00t</div>
<?php
}
?>
</body>
</html>
w00t
26 antwoorden
Gesponsorde links
timo - 24/11/2006 17:51
PHP ver gevorderde
en nog valid volgens me tidy ook:P
svm - 24/11/2006 19:05 (laatste wijziging 24/11/2006 19:09)
PHP ver gevorderde
Whou, kei mooi.
Zou ik niet opgekomen zijn.
Edit:
FangorN, voor mijn eigen webmaster communitie heb ik ook een tutorial over statements.
Mag ik dit script van je gebruiken als voorbeeld voor de for-loop?
DenMette - 28/11/2006 22:17
PHP gevorderde
Woot
het was zeker voor de bezighied?
Waar mensen zich mee kunnen bezig houden tegenwoordig?
Lol
Thomas - 08/12/2006 14:26 (laatste wijziging 08/12/2006 14:28)
Moderator
Nog meer boredom!
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
var id = 0;
function w00t(show)
{
var elt = document.getElementById("id_"+id);
elt.className = (show) ? "show" : "hide";
id++;
if(id < 200)
{
setTimeout("w00t("+show+")", 1);
}
else
{
show = 1 - show;
id = 0;
setTimeout("w00t("+show+")", 1);
}
}
</script>
<style type="text/css">
.show
{
display: block;
visibility: visible;
}
.hide
{
display: none;
visibility: hidden;
}
</style>
</head>
<body style="background-color: #000">
<?php
$x = 512;
$y = 384;
$to = 200;
$mult = 5;
for($r=0; $r < $to; $r++)
{
// positie
$left = $x + (int) (sin(deg2rad($r * $mult)) * $r * $mult/2);
$top = $y + (int) (cos(deg2rad($r * $mult)) * $r * $mult/2);
// kleur
$rd = str_pad(dechex($r), 2, "0", STR_PAD_LEFT);
$gr = "00";
$bl = str_pad(dechex($to - $r), 2, "0", STR_PAD_LEFT);
// textgrootte
$t = number_format(5 + ($r/$to) * 50, 1);
?>
<div id="id_<?= $r ?>" class="hide" style="position: absolute; left: <?= $left ?>px; top: <?= $top ?>px; color: #<?= $rd.$gr.$bl ?>; font-size: <?= $t ?>pt">w00t</div>
<?php
}
?>
<button type="button" onclick="w00t(1)">w00t</button>
</body>
</html>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
var id = 0;
function w00t(show)
{
var elt = document.getElementById("id_"+id);
elt.className = (show) ? "show" : "hide";
id++;
if(id < 200)
{
setTimeout("w00t("+show+")", 1);
}
else
{
show = 1 - show;
id = 0;
setTimeout("w00t("+show+")", 1);
}
}
</script>
<style type="text/css">
.show
{
display: block;
visibility: visible;
}
.hide
{
display: none;
visibility: hidden;
}
</style>
</head>
<body style="background-color: #000">
<?php
$x = 512 ;
$y = 384 ;
$to = 200 ;
$mult = 5 ;
for ( $r = 0 ; $r < $to ; $r ++ )
{
// positie
$left = $x + ( int
) ( sin ( deg2rad ( $r * $mult ) ) * $r * $mult / 2 ) ; $top = $y + ( int
) ( cos ( deg2rad ( $r * $mult ) ) * $r * $mult / 2 ) ;
// kleur
$gr = "00" ;
// textgrootte
?>
<div id="id_<?= $r ?> " class="hide" style="position: absolute; left: <?= $left ?> px; top: <?= $top ?> px; color: #<?= $rd . $gr . $bl ?> ; font-size: <?= $t ?> pt">w00t</div>
<?php
}
?>
<button type="button" onclick="w00t(1)">w00t</button>
</body>
</html>
w00000000000000000000000000t!
delta_004 - 08/12/2006 17:45
Onbekend
Boj jongen. Echt prachtig en dat met php:D Niet gedacht egt super!
timo - 08/12/2006 17:59
PHP ver gevorderde
die laatste is egt zwaar vet, alleen loopt ie van m'n scherm af... maar dat is een kleinigheid:P
Ibrahim - 08/12/2006 19:56
PHP expert
die 2e script werkt niet, met die button
Gesponsorde links
Dit onderwerp is gesloten .