Strange stats readings

I’m using the Yaron’s API User script to update my stat(s) site(s)

But recently i get different values on mij localhost and webhosting :confused:
(both sites update on the same time)

Update script 1 values
userid, date, keys, clicks, rank, miles
108816,20090522,27216552,8447422,1426,290.157
246947,20090522,240996,88348,81245,9.91
247895,20090522,76982,89304,95427,13.278
239353,20090522,11679632,2060077,6953,227.208
251988,20090522,603414,61969,64260,7.058
252796,20090522,1100024,405427,51093,30.109
115984,20090522,27161342,6555409,1431,286.961
213650,20090522,946475,446263,54465,53.824
173485,20090522,8439967,3927249,10722,147.463
208052,20090522,5108378,1223783,18361,84.676

Site 2

Update script 2 values
userid, date, keys, clicks, rank, miles
108816,20090522,27222990,8453988,1425,290.618
246947,20090522,247737,89700,80794,10.126
247895,20090522,88502,101304,94023,15.165
239353,20090522,11709632,2066016,6933,228.124
251988,20090522,603414,61969,64251,7.058
252796,20090522,1100024,405427,51088,30.109
115984,20090522,27161342,6555409,1432,286.961
213650,20090522,946475,446263,54462,53.824
173485,20090522,8480246,3945940,10670,150.365
208052,20090522,5108378,1223783,18362,84.676

You’re saying they’re supposed to update at the same time…

…do you mean the same time according to gmt? Check and make sure the time locally is the same time as your host.

[quote=The Lost Faith]You’re saying they’re supposed to update at the same time…

…do you mean the same time according to gmt? Check and make sure the time locally is the same time as your host.[/quote]

The same time!
82.95.215.134/deapen/taskpane.png

Local and gmt time are the same after updating! My webhosting is in United Kingdom and local in the Netherlands

Localhosting: 82.95.215.134/whatpulse/
Webhosting: gmhellinga.nl/grandmasg/WP/ (www before it)
___________Here ^^ can you see the difference ____

Your scripts are definitely updating at different times. Check to see the time on your server and make sure your crons are set for the right time.

There are only one set of xml stats displayed live.

I’m not sure if this will help but I feel like promoting myself :slight_smile:

http://forums.whatpulse.org/showpost.php?p=24204&postcount=15

This script grabs the content directly from the API each time it’s loaded. If I’m not helping; Sorry :smiley:

I put together a very basic script, it can be run via cron or manually and it’ll query the xml file for your key total and add them to keys.txt. could use a database if you wanted.

[code]<?php
$whatpulseid = “210575”;

$url = “http://whatpulse.org/api/user.php?UserID=”. $whatpulseid;
$what = “TotalKeyCount”;
$xmlFileData = file_get_contents($url);
$xmlData = new SimpleXMLElement($xmlFileData);
$xmlData = $xmlData->$what;
$xmlData = number_format($xmlData);
$keys = $xmlData;

$file = “keys.txt”;
$fh = fopen($file, ‘w’) or die(“oh gosh golly an error!”);
$Data = $keys;
fwrite($fh, $Data);
fclose($fh);
?>[/code]

api updates hourly (or so) so updating on load is stupid :slight_smile: