I'm working on a modification which integrates some options from [url=http://www.last.fm/]Last.fm[/url] to phpBB3 where users can enter their username and get data of friends who are also registered on the board and all the statistics (user's top artists, tracks and so on...).
I'm currently working on the API to port all the options and authentication from last.fm to phpBB3 and it's all working fine, but I'm thinking of how to get all the statistics from the XML-sources.
A feature of the modification is to get all the statistics from users to a statistics-page, so I wanted to grab them every time someone views the statistics, but I'm wondering if that would make the page very slow when a large amount of users use these functions, or maybe there is some sort of other way to do it (cache it and renew it every hour so only once the page will be slower, or maybe just saving it in the database but I don't think that's a good way of saving it when it updates frequently).
Are there people here that could suggest the best way of doing this?
Thanks in advance
Statistics from multiple XML-sources
- igorw
- Past Contributor
- Posts: 1967
- Joined: 01 Jun 2006, 20:48
- Real name: Igor [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Statistics from multiple XML-sources
I'd move the task to cron.php. This will require two file edits. One to includes/functions.php (page_footer() function) and one to cron.php itself. Like that it will renew every now and then and not put too much load on the server.
- we're poor!
-
- Supporter
- Posts: 27
- Joined: 01 Sep 2007, 12:27
- Real name: Tim [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Statistics from multiple XML-sources
Hmm, never used cron.php so didn't came up in my mind
Thank you for the suggestion and I'll look at it
Thank you for the suggestion and I'll look at it
Return to “phpBB Development discussion”
Who is online
Users browsing this forum: No registered users and 25 guests