Ok, here's my code that I want to pick a random line from a text file, and
then mail myself 10 times with a different line each time...
But It simply won't work...
Anyone know why?
<?
function randomline($filename) {
$file = file($filename);
srand((double)microtime()*1000000);
$abc = $file[rand(0,count($file))];
}
$i = 0;
while (2 > $i) {
$abc = randomline('text.txt');
mail("[EMAIL PROTECTED]", "$abc", "$abc", "From: [EMAIL PROTECTED]");
$i++;
}
?>
<HTML>
<BODY>
Mails sent!
</BODY>
</HTML>
*********************************************************************
The information contained in this e-mail message is intended only for
the personal and confidential use of the recipient(s) named above.
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original message.
***********************************************************************