The online racing simulator
Quote from Victor :btw to all, the following line in the PST stat is buggy atm :

current / last car

This will be fixed in patch V, so you might not wanna take this value too seriously just yet.

The "online status" line is not 100% right all the time either.
That one too is related to the same problem. Will be fixed in patch V. For now you could assume 0 is offline and > 0 is online.
Has anyone got a sample script they could share with me, i'm really only just getting into this kind of thing and don't know where to start. If i could look at a sample then i could work it out from there.
Thanks for any help guys!
Quick question regarding the identification keys. I'm updating the LFS module for mUtil ( http://users.pandora.be/viperius/mUtil/ ) as it didn't work anymore with the 1.3 update. It now works again (not yet deployed); however i'm using my own ident key. Is this a problem seeing multiple people will use this program to retrieve the hosts info? The ident key should be coupled to an application instead of a user account in this case. I could off course require the users to enter their own ident key, however that option isn't very user friendly imo.
Issue since patch U32
Hi Victor,

I use the hosts action to generate a server status table. With patch U32 I've noticed the the patch version number is missing from the data so all subsequent bytes are out by one. This has generated some wierd output I pressume this is a stats issue and not a patch issue.

Patch U32, byte 32 onwards (TML TCRM)
02 05 55 00 01 01 0D

Patch U30, byte 32 onwards (TMLT TCRM)
02 05 55 1E 20 01 01 0D

Do the stats not like hex 20
my guess is it's patch related, since after some debugging I see that what I get from LFS are 3 bytes with the latest patch and not 4. So hopefully this'll be fixed soon.

Does this bug really break your output? I can remove these 3-byte TMLT hosts for now if needed.
ok, it's not patch related. It was me noob long time ago - related

It was a wrong data storage type in the db for TMLT values - fixed now.
Thanks Victor, that works perfectly now

Kind Regards

KayJay
Hi,
I have a script to check for racers currently online at my team's forum.
It used to function properly until today.
The output pubstat gives me is "no output"
I execute the following script "http://lfsworld.net/pubstat/get_stat2.php?action=hosts&idk=...."
What could be wrong?
Quote from Viperius :Quick question regarding the identification keys. I'm updating the LFS module for mUtil ( http://users.pandora.be/viperius/mUtil/ ) as it didn't work anymore with the 1.3 update. It now works again (not yet deployed); however i'm using my own ident key. Is this a problem seeing multiple people will use this program to retrieve the hosts info? The ident key should be coupled to an application instead of a user account in this case. I could off course require the users to enter their own ident key, however that option isn't very user friendly imo.

Since I am a big fan of mUtil and waiting for ages for this patch (I even created my own buddy thing for LFS for private use).
The main reason Viperius hasn't released an update is because his questions didn't get answered.

The questions are:
- Is it allowed to create an application using a fixed ident key (in this case Viperius personal key). If this application gets used by hundreds of people will the key get banned for 'excessive use' ?

- Is the non-premium delay based on the ident key or the IP ? If hundreds of people use the same key will they get extremely long waiting times because the key is being used by others. Or is it just the same as before with no key when the delay was based on IP ?
Quote from Knarf :Since I am a big fan of mUtil and waiting for ages for this patch (I even created my own buddy thing for LFS for private use).
The main reason Viperius hasn't released an update is because his questions didn't get answered.

The questions are:
- Is it allowed to create an application using a fixed ident key (in this case Viperius personal key). If this application gets used by hundreds of people will the key get banned for 'excessive use' ?

- Is the non-premium delay based on the ident key or the IP ? If hundreds of people use the same key will they get extremely long waiting times because the key is being used by others. Or is it just the same as before with no key when the delay was based on IP ?

I don't wanna sound cranky, but what do you think?

1) if someone wants to give his identkey to everybody - it's stupid, but hey if he really wants to, be my guest.

2) the idk tells me a username - that's what it's based on. If hundreds of people use that same key then of course it's not gonna work at all.

he just needs to code an input box where people can enter their own idk. Done.
Ideas.
  • Don't allow premium usage unless a key has been set to allow it.
  • Add request function to account pages at liveforspeed.net, push button-receive idkey.
  • LFS(W) command /idkey, put response in clipboard, echo "go paste the key in your app". Don't accept paste from clipboard in LFS until contents have changed.
  • LFS command line switch /idkey, popup dialog "do you want to request a key", returns key.
Quote from Victor :I don't wanna sound cranky, but what do you think?

I thought it was no problem to do this. Cause in the past I had the following conversation with you



Quote :1) if someone wants to give his identkey to everybody - it's stupid, but hey if he really wants to, be my guest.

Why ? If it is a premium account you pay for others but with other accounts I don't see the problem?

Quote :he just needs to code an input box where people can enter their own idk. Done.

What about all those league-websites that have a server-status thing on their mainpage showing who is online at their server at the moment ? Or which drivers of the league are online on which server ? That is also used by lot's of different people and I never have seen such a website ask me for my ident key.

I know it is the webserver doing those requests but infact it is just the same. Multiple users using the same ident key. But if you use a web application it is allowed, and otherwise it is not allowed ?
Quote from Knarf :What about all those league-websites that have a server-status thing on their mainpage showing who is online at their server at the moment ? Or which drivers of the league are online on which server ? That is also used by lot's of different people and I never have seen such a website ask me for my ident key.

That is one query to LFSWorld tho via `?action=hosts`. All you have to do is look for the users that way. You can also get the users on your own server that way also. You also could use an InSim application to talk back to your website and give even more information from the server.

We are talking about "programming your way out of a paper box". It's not hard, if you have the right tools, or happen to be handy with some some kind of cutting device (InSim, neat an tidy.), or you could burn a hole in the side (LFSWorld query via hosts command, good but does not tell the full story), or you could impale it hundreds of times until the walls become weak (Get all of the users in your league and query each one of them via ?action=pst, slow and cost more money in the end.).The best solution would be the cutting device.

I woke up on the 'smart arse' side of the bed today.
like I said, you _can_ share it, but you'll be paying for all usage from everybody using it. If you don't mind that, who am I to stop you?

Quote :I know it is the webserver doing those requests but infact it is just the same.

No it's not. A webserver is a centralised place that uses pubstat. It can cache all the requests it makes for optimal usage of the data it retrieves. If 10 people visit the site and see the 'who is online list', the webserver maybe had to make 2 pubstat requests depending on how frequently it wants to update the list.

If you instead have 10 separate clients, then every client will have to make a pubstat request -> more requests.

Additionally, if these 10 people do a simultaneous request on the webserver, it'll work fine.
If 10 separate clients make simultaneous requests, it will work for 1 and fail for the other 9 (if they share 1 identkey).

Of course this last one only applies to the free pubstat - if all 10 clients were to use a premium identkey, then it would still work. But it would also have worked for free if they had used their own identkey.
Victor;
Do you think there would be any sense in adding a 'since' parameter that takes a timestamp and returns results for the given pubstat since that timestamp?

I suggest this because for things like pbs, hls and hostlist we are requesting all of the data time and time again when in fact the vast majority of it has not changed. Kinda redundant.

Obviously, this would depend on how your schema is laid out and whether you store a timestamp for the relevant data (which if you dont at present, you should look in to for optimal replication in the future).

As long as you have an index on the timestamp this would reduce database load, web server bandwidth (on both sides) and computational cost (again, on both sides).

Just a thought
Quote from Dygear :That is one query to LFSWorld tho via `?action=hosts`.

I know... mUtil in my opinion also does just one query (it did not wrote it but I am pretty convinced it only does that 1 request).


@Victor:
If we create a small application that does a ?action=hosts request every ten minutes and cache the result of this query on our own server and let mUtil talk to our cached page that would be ok I presume ? Or do you get banned from pubstat when sending 1 requests 24/7 every 10 minutes ?
Noone will ever get banned for using the pubstat (well, extremely unlikely anyway). All the tarpitting is put in place to prevent abuse, so use it as you see fit.
uhhh.. before I try this....

the script URL...

Should I <?PHP Require_once '<url>'; ?>

Just checking... full example isn't present!
Quote from CodieMorgan :uhhh.. before I try this....

the script URL...

Should I <?PHP Require_once '<url>'; ?>

Um ... no. Remote inclusion is bad m'kay? If you make frequent (or any) use of it you should be severely beaten with teaspoons.

See http://www.lfsforum.net/showthread.php?t=13328 for some code that will do it for you. If you want to write your own, you could always just look at the code presented there to see how you may go about it.
Quote from Anarchi-H :See http://www.lfsforum.net/showthread.php?t=13328 for some code that will do it for you. If you want to write your own, you could always just look at the code presented there to see how you may go about it.

Awe shucks, you love me, you really love me!
I've done some work on the SDK, but have not updated the on line code with it. I'll get around to it ... just not right away.
#48 - vane
is there any html code that i can put on my website that says what server im on? like the thing at the left side that in the column near you username, thanks

oh by the way what is an identikey and what do they do?
Under "?action=hl_log" there is this comment for time:

"// upload-time (unix timestamp, GMT+1 (UK))"

Does this mean the timestamp is given in GMT+1, not UTC / GMT..?

FGED GREDG RDFGDR GSFDG