Bug in XML-API: & must be &


Try for example this link:

<Homepage>....index.php?s=member[color=Red]&id=42[/color]</Homepage>The ‘&’ must be ‘&’ to be valid XML. My parser refuses to read that XML-file.

That “You are only allowed to post URLs to other sites after you have made 15 posts or more.” is really annoying :mad:

The no-URL rule prevents spambotters from posting. This is what I had to deal with before it was instated:

During 2007, we had the no-link rule in place. Here’s what I’ve got:

If I could figure out how to change the 15 to something better, like 5, I would. But I have no clue where to start.

Fixed this :wink:

@X-Kal: vBulletin 3.7 (currently beta 4) will introduce a spam management system. It’s also featuring Akismet support, which should stop almost all spam :slight_smile:

Good! Though I would imagine that spammers will have ways of getting past that, eventually. They always do :confused:

[quote=RS_Jelle]Fixed this ;)[/quote]Thanks.

I got a fews questions about the API. Perhaps you can answer these as well:

I’m running a website about our WhatPulse team and therefore I make use of the API quite a lot because I offer statistics of all team members.
When I developed the website I build in a cache so I haven’t to query the API every time I got a user who wants to see a user’s profile.

But after a few days I noticed a strange phenomenon:
My site says that it has fetched stats from WhatPulse via API just a few seconds ago. I compared with the user profile at whatpulse.org and realized that my data was older than it should be.

It seems that the data you offer via API is only updated once an hour.
Am I correct ? And is there a reason why you don’t send the stats live ?

The user API pages are indeed cached for one hour. This is done for saving some server resources. Normally that should be enough as you don’t type that much in one hour :slight_smile:

So creating a cron job for getting the API XML’s (and then caching them on your site for an hour) is a better way to retrieve the information.

Well, then I will set my cache to one hour. The result is the same as the cronjob would do, only I need fewer requests :slight_smile:

What about the team stats ? Are they live or is there a one hour delay also ?

The team stats are cached for 15 seconds at the moment.

bug in the api:
$data = implode("", file(" i can’t post links /api/users.php?UserID=".$userid));
users.php should be user.php

And because there is an example on the api page there is no need to also print stats in the api file.

and can we have more stats in the api? I’d like to see last-pulse and miles moved whith mouse.

edit: oh, the stats are much more complete. I think I am going to rewrite that api. I’ll post here when I am done.


now making an example index.php file to show how you can display the stats.

edit 3:
an example of how you could display the stats:
$WP_stats = new WP_stats;
$stats = $WP_stats->get(182042);

echo '<table>';
foreach ($stats as $id=>$stat) {
	echo '<tr><td>'. $id .'</td><td>'. $stat .'</td></tr>';
echo '</table>';

This will display the stats as you can see on: http://www.bierkip.nl/keys/

for more info contact me via http://www.bierkip.nl