Ive been testing this, but its not quite working properly.
Any help at all , please ??
$query = "SELECT *
FROM `txtlog`
ORDER BY RAND()
LIMIT 0 , 1";
$result = mysql_query($query) or die(mysql_error());
while($row=mysql_fetch_array($result))
{
$wordtxtimg = include '/home/txt/randum.php';
$row[content] = str_replace ("abcdefghi", "$wordtxtimg", $row[content]);
echo "$row[content] \n";
}
randum.php
$textfile ="/home/txt/randum.txt";
$items = file("$textfile");
$item = rand(0, sizeof($items)-1);
echo $items[$item];
randum.txt
asdfghjkl
123456789
The MySQL query returns longtext, what Im attempting is to replace a piece of text with another, that is randum generated through randum.php
What Im getting is the include just ouputs without proceeding to the replace call.