some sentences seem to be coming up quite often, and i realize that i used kinda small lists (about 10 words per) but there shouldnt be definate patterns like that. anyways, the site is
http://goomba300.port5.com/sentence.php
heres the code:
Code: Select all
<html>
<body>
<?
$sentences_array = file('sentences.txt');
$sentence = $sentences_arrayїrand(0, count($sentences_array) - 1)];
$sentence = trim($sentence);
$adjs_array = file('adjs.txt');
$adj1 = $adjs_arrayїrand(0, count($adjs_array) - 1)];
$adj1 = trim($adj1);
$adj2 = $adjs_arrayїrand(0, count($adjs_array) - 1)];
$adj2 = trim($adj2);
$advs_array = file('advs.txt');
$adv1 = $advs_arrayїrand(0, count($advs_array) - 1)];
$adv1 = trim($adv1);
$adv2 = $advs_arrayїrand(0, count($advs_array) - 1)];
$adv2 = trim($adv2);
$verbs_array = file('verbs.txt');
$verb1 = $verbs_arrayїrand(0, count($verbs_array) - 1)];
$verb1 = trim($verb1);
$verb2 = $verbs_arrayїrand(0, count($verbs_array) - 1)];
$verb2 = trim($verb2);
$snouns_array = file('snouns.txt');
$snoun1 = $snouns_arrayїrand(0, count($snouns_array) - 1)];
$snoun1 = trim($snoun1);
$snoun2 = $snouns_arrayїrand(0, count($snouns_array) - 1)];
$snoun2 = trim($snoun2);
$pnouns_array = file('pnouns.txt');
$pnoun1 = $pnouns_arrayїrand(0, count($pnouns_array) - 1)];
$pnoun1 = trim($pnoun1);
$pnoun2 = $pnouns_arrayїrand(0, count($pnouns_array) - 1)];
$pnoun2 = trim($pnoun2);
$preps_array = file('preps.txt');
$prep1 = $preps_arrayїrand(0, count($preps_array) - 1)];
$prep1 = trim($prep1);
$prep2 = $preps_arrayїrand(0, count($preps_array) - 1)];
$prep2= trim($prep2);
$art = "the";
eval ("\$sentence = "$sentence";");
echo $sentence. "\n";
echo "<p></p>";
echo "<A HREF="http://goomba300.port5.com/sentence.php" TARGET="_self">refresh.</A>";
?>
</body>
</html>thanks,
nick podges