View Full Version : Problem with pubstat
Falcon1
6th July 2008, 21:07
Hello,
we have a script on our forum, which checks on LFSW if any of the team members are racing online. For like a year now, it was working perfectly.
Lately, however (iirc since the Y30 was released), the data that the script prints out after analyzing lfsw's response to the pubstat call are extremely wrong.
Were there any changes made to the response data layout?
Thanks
Victor
6th July 2008, 21:43
no, nothing has changed lately.
which pubstat data are you requesting?
Dygear
6th July 2008, 22:14
<?php
$teamName = 'Euro Racing Group';
require_once('lfsworldsdk.php');
foreach ($SDK->get_teams() as $Team) {
if ($Team['team'] == $teamName) {
$teamMembers = $Team['members'];
}
}
foreach ($SDK->get_hosts() as $Host) {
if ($Host['nrracers'] != 0) {
foreach ($Host['racers'] as $Racer) {
foreach ($teamMembers as $Member) {
if ($Racer == $Member) {
echo $Return[$Racer] = $Host['hostname'];
}
}
}
}
}
print_r($Return);
?>
Falcon1
7th July 2008, 15:02
I am requesting the http://lfsworld.net/pubstat/get_stat2.php?action=hosts&idk=...
Could there be any problems with my ident key? ( i am using it since the beginning and it usually tranferres hundreds of MBytes per month).
Dygear's script doesn't work either.
Apparently, the number of returned hosts is zero.
Victor
7th July 2008, 15:28
I don't know really. You'll have to debug your script and see what it is that you are receiving.
When I run that url manually, i get all hosts info, so your "number of returned hosts is zero" is not correct.
Falcon1
7th July 2008, 15:55
hmm, then maybe there is an issue with my host's php, as the "number of returned hosts is zero" also applies to Dygear's LFSWorldSDK..
I'm gonna research it a bit and then I'll come back
Thanks
FM-Failure
7th July 2008, 18:32
Hello,
maybe this also falls under the same category:
Since a while Starblue's Event Tracker can't fetch people's PBs via pubstat anymore, it always worked perfectly and we haven't changed anything...
The log only outputs "ERROR - Something failed while retrieving PB!
java.lang.NumberFormatException: For input string: "this" "
Victor
7th July 2008, 19:08
a while ago i added a flooding check - there were/are several people who, when tarpitted, were just doing repeating requests (like 10 per second) until tarpit-time has passed. I block those now (for half an hour or so), because it's bad practise do flood someone until you get an answer.
maybe that's what's causing that script to fail, I don't know.
Dygear
7th July 2008, 22:36
Indeed, I tested with my IDKey and PS set to true.
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.