The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Hopefully someone here can point me in the right direction and let me know if this is possible.
I have a table on a online community that shows things like which users are online, how many posts have been made that day, number of topics, posts etc.
At the moment the information in the table is just made up, what I want to do is use PHP to get the information from somewhere. I know this is usually a database.
For the project though I don't need to use a database, I can just spoof how the information is retrieved. So I was thinking I could put the information into a text file and read it from there.
Is that possible?
Is it easy or would it be easier to just make a small database up for this purpose and use that.
Would appreciate any help or suggestions.
Thanks
$fp = fopen("test.txt", "r");
$line_data = file("test.txt");
for($i=0;$i
print trim($line_elements[0]) . '
';
print trim($line_elements[1]) . '
';
}
fclose($fp);
?>
Just need to work out a way of displaying the info better now.
Can get it to write out each character from a line but what I really want is to have a line like:
Number of Users Online | 23
Then to be able to use the | as a seperator character (not sure what its called in PHP) so that I can use the "Number of Users Online" and the "23" parts seperately.
Anyone able to give me a help with this one?
Hopefully someone here can point me in the right direction and let me know if this is possible.
I have a table on a online community that shows things like which users are online, how many posts have been made that day, number of topics, posts etc.
At the moment the information in the table is just made up, what I want to do is use PHP to get the information from somewhere. I know this is usually a database.
For the project though I don't need to use a database, I can just spoof how the information is retrieved. So I was thinking I could put the information into a text file and read it from there.
Is that possible?
Is it easy or would it be easier to just make a small database up for this purpose and use that.
Would appreciate any help or suggestions.
Thanks