willekeurige-zin-tekst
Gesponsorde koppelingen
PHP script bestanden
<html>
<head>
<title>CYPRUS - Eiland van de zon en de liefde</title>
</head>
<body>
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
$curpath = "cyprus";
$filename= "weetjes.txt";
$weetjes = array();
$fp = fopen ($curpath . "/" . $filename,"r");
while (!feof($fp)) {
$weetjes[] = fgets ($fp, 200);
}
fclose ($fp);
srand ((float) microtime() * 10000000);
$linenum = array_rand($weetjes);
echo "Wist je dit al:<br><i>" . $weetjes[$linenum] . "</i></p>\n";
?>
$curpath = "cyprus";
$filename= "weetjes.txt";
$weetjes = array();
$fp = fopen ($curpath . "/" . $filename,"r");
while (!feof($fp)) {
$weetjes[] = fgets ($fp, 200);
}
fclose ($fp);
srand ((float) microtime() * 10000000);
$linenum = array_rand($weetjes);
echo "Wist je dit al:<br><i>" . $weetjes[$linenum] . "</i></p>\n";
?>
</body>
</html>