WhatPulse Forums
Strange stats readings - Printable Version

+- WhatPulse Forums (http://whatpulse.org/forums)
+-- Forum: Support (/forumdisplay.php?fid=38)
+--- Forum: Website (/forumdisplay.php?fid=60)
+--- Thread: Strange stats readings (/showthread.php?tid=740)



Strange stats readings - [DeApen]Grandmasg - 05-26-2009 08:02 AM

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)

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



Strange stats readings - The Lost Faith - 06-29-2009 06:55 AM

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.


Strange stats readings - [DeApen]Grandmasg - 06-29-2009 03:48 PM

The Lost Faith Wrote: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.

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 ____


Strange stats readings - The Lost Faith - 06-29-2009 09:18 PM

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.


Strange stats readings - c-smith - 06-29-2009 10:18 PM

I'm not sure if this will help but I feel like promoting myself 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 Big Grin


Strange stats readings - citricsquid - 07-03-2009 05:36 PM

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);
?>

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