Statistics from multiple XML-sources

Discuss the development of future releases of phpBB (phpBB 3.x minor releases) and MODing/Coding related questions.
[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
BetaDevil
Supporter
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

Statistics from multiple XML-sources

Postby BetaDevil » 23 Aug 2008, 21:44

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 :D

User avatar
igorw
Past Contributor
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

Postby igorw » 23 Aug 2008, 21:48

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!

BetaDevil
Supporter
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

Postby BetaDevil » 23 Aug 2008, 22:21

Hmm, never used cron.php so didn't came up in my mind :P

Thank you for the suggestion and I'll look at it :D


[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
[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

Return to “phpBB Development discussion”

Who is online

Users browsing this forum: No registered users and 25 guests