WhatPulse Forums » Support » Website v » Bug in XML-API: & must be & Welcome back, Guest.


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug in XML-API: & must be &
01-04-2008, 02:51 PM (This post was last modified: 01-04-2008 04:14 PM by X-Kal.)
Post: #1
Bug in XML-API: & must be &
Hello.

Try for example this link:
http://whatpulse.org/api/user.php?UserID=5555

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

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

____
Join klamm.de and our WhatPulse-team at www.whatpulse-team.de.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-04-2008, 04:17 PM
Post: #2
Bug in XML-API: &amp; must be &amp;amp;
The no-URL rule prevents spambotters from posting. This is what I had to deal with before it was instated:
http://forums.whatpulse.org/showthread.php?t=3545

During 2007, we had the no-link rule in place. Here's what I've got:
http://forums.whatpulse.org/showthread.php?t=4229

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.

[Image: XKalSig1.png]
Visit this user's website Find all posts by this user
Quote this message in a reply
01-31-2008, 06:16 PM
Post: #3
Bug in XML-API: &amp; must be &amp;amp;
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 Smile

Greetz, Jelle
WhatPulse Webdeveloper
Visit this user's website Find all posts by this user
Quote this message in a reply
02-01-2008, 07:18 AM
Post: #4
Bug in XML-API: &amp; must be &amp;amp;
Good! Though I would imagine that spammers will have ways of getting past that, eventually. They always do :/

[Image: XKalSig1.png]
Visit this user's website Find all posts by this user
Quote this message in a reply
02-09-2008, 04:08 PM (This post was last modified: 02-09-2008 08:00 PM by theHacker.)
Post: #5
Bug in XML-API: &amp; must be &amp;amp;
RS_Jelle Wrote:Fixed this Wink
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 ?

____
Join klamm.de and our WhatPulse-team at www.whatpulse-team.de.
Visit this user's website Find all posts by this user
Quote this message in a reply
02-11-2008, 11:13 PM
Post: #6
Bug in XML-API: &amp; must be &amp;amp;
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 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.

Greetz, Jelle
WhatPulse Webdeveloper
Visit this user's website Find all posts by this user
Quote this message in a reply
02-12-2008, 01:04 PM
Post: #7
Bug in XML-API: &amp; must be &amp;amp;
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 Smile

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

____
Join klamm.de and our WhatPulse-team at www.whatpulse-team.de.
Visit this user's website Find all posts by this user
Quote this message in a reply
02-19-2008, 08:53 PM
Post: #8
Bug in XML-API: &amp; must be &amp;amp;
theHacker Wrote: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.

Greetz, Jelle
WhatPulse Webdeveloper
Visit this user's website Find all posts by this user
Quote this message in a reply
03-24-2008, 11:35 PM (This post was last modified: 03-31-2008 06:46 AM by X-Kal.)
Post: #9
Bug in XML-API: &amp; must be &amp;amp;
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.

http://bierkip.nl/keys/user_parse.phps

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:
PHP Code:
<?
    
require('user_parse.php');
    
$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
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)