The online racing simulator
Quote from narcis :Because the premium pubstat service costs more $$$ if you get more data...And the "size of all times" is >>>>>> "size of times I want each time"

seriously, the currently biggest premium pubstat spender spends less than 10 pennies a month. Being concerned about $$$ really is exaggerated.
Quote from VorTeX3k :Is it possible that the Laps byte will only be a non-zero value if the server has currently a race running on it?
I have set my server to 10 laps but there's nobody online. And LFSW gives me 0 as value for laps. Is this correct that this value will only change when there's someone driving on the server?

if you change something on a host, it should update on lfsworld too. Doesn't matter if someone is on the host or not.
Quote from Victor :if you change something on a host, it should update on lfsworld too. Doesn't matter if someone is on the host or not.

Well.. in this case there seems to be a problem in my script.. For some servers I get 0 laps (but I know that 10 laps have been set) and for some others I get the correct value :/ Ok, so I should have a look at this.

By the way: is it possible to make pubstat donations via PayPal?
Quote from VorTeX3k :Well.. in this case there seems to be a problem in my script.. For some servers I get 0 laps (but I know that 10 laps have been set) and for some others I get the correct value :/ Ok, so I should have a look at this.

By the way: is it possible to make pubstat donations via PayPal?

If I remeber correctly, you get 0 laps if the server is currently running a qualifying session. No matter how many laps are set for the race.
Hi guys!

i try this in code for show who of the team is online (page 5):


<?php 
include("lalala.php");
$con mysql_connect$host$user$senha );
$sql "SELECT nick, nome FROM pilotos";
$res mysql_db_query$db$sql$con );
while( 
$row mysql_fetch_array$res )){
       
$nick   $row["nick"];
       
$nome   $row["nome"];
       
$nicks .= " \"$nick\",";
       
$nomes .= " \"$nome\",";
}
 
$nicks substr("$nicks"0, -1);
$nomes substr("$nomes"0, -1);
 
$TeamMembers = array($nicks);
$InGameName = array{$nomes);
 
?>

But this don't work's!

I wanna automate the process, i have a little db with team members lfsw nicks and names, so, for i don't need edit the php code every time i add a new team member...

Any light?

Hugs/Abraços,
Saulo Barbosa
Quote from soyobr :Any light?

Can't say i really understand what you're asking for, but if it's the array creation ..

<?php 
while($row mysql_fetch_array($res)){
  
$nicks .= "{$row['nick']},";
  
$nomes .= "{$row['nome']},";
}
$TeamMembers explode(","$nicks);
$InGameName explode(","$nomes);
?>

.. or ..

<?php 
while($row mysql_fetch_array($res)){
  
$nicks[] = $row['nick'];
  
$nomes[] = $row['nome'];
}
?>

thank's a lot filur!

i forgot the explode function generate a array too illepall hehe

just a little modification:


<?php 

  $nicks 
.= "{$row['nick']},";
  
$nomes .= "{$row['nome']},";

}

$nicks substr("$nicks"0, -1);
$nomes substr("$nomes"0, -1);

$TeamMembers explode(","$nicks);
$InGameName explode(","$nomes);

?>

Remove the last "," for don't create a new blank member in array

hugs/abraços,
Saulo Barbosa
Forgive me for being blunt but isn't your code over complicated?
Why put the names in a string only to explode them?

If you don't need the comma delimited list, a tiny alteration to filurs code would be more efficient...


<?php 
while($row mysql_fetch_array($res)){ 
  
$TeamMembers[] = $row['nick']; 
  
$InGameName[] = $row['nome']; 
}
?>

And even if you do need the comma delimited lists, imploding the array would be a better way to achieve it because implode is quicker than explode and you won't need to remove the trailing comma.


<?php 
$nicks 
implode(','$TeamMembers);
$nomes implode(','$TeamMembers);
?>

And why use two arrays when you only need one?

<?php 
while($row mysql_fetch_array($res)){ 
  
$TeamMembers[$row['nick']] = $row['nome']; 
}
?>

hi guys

im not really that good at this but ive tried and failed all i seem to get is all these words on screen when i load to a web page.
ive tried to read through the 285 posts here but its a bit hard and took like 3-4 days to do.

is there somthing that can help out like for a noob to this lol im a BIG noob when it comes to this kind of stuff. the big problem for me is that i cant seem to figure out what im doing wrong. what i want to do is have a part of my site say who is online in the team and what server there on ive seen many other teams with this. if im in the wrong place please tell me.

i just need to know what needs to be done to have these in my webspace.
i have dreamweaver 8 well the full macromeadia 8 which was given to me when i brought my computer long story thats better told at another time.

ive also seen the AAL site they have a place on the side that shows your Hot Laps and all the stuff that LFSW show you about your time online and fule stuff like this.

im just wondering is it hard for someone with little experiance to do this or is it more for the pros.

thanks for any help in advance.

if ive left anything out you need to know please tell me and ill post it.

thanks racemania
Quote from racemania :the big problem for me is that i cant seem to figure out what im doing wrong.

My guess is you're trying to achieve this without any form of server-side scripting/cgi (php/asp etc.)

Result: you can't, all the code/snippets posted in this thread deals with fetching statistics and info from lfsworld using a server-side scripting language such as PHP or ASP, HTML is used to present the information, not gather it.

Solution: find out if your web host offers any server-side script support, if you're running your own web server, find out how to offer it yourself.
ok thanks for your quick reply im looking into it now thankyou
well, i've got a qeustion too. don't know if it was requested before, so foregive me if someone asked before...

victor:
is it possible to get the timestamp of a lfs racer when he was the last time online?
hmm, no, I don't have that value stored atm. I've made a note for the next version of the pubstats.
Suggestion: Subscribe to changes
Hi, just thought of something that would be very useful (to me at least... )

It should be possible to somehow subscribe to changes in certain stats.

For example: I want to know when racerA has set a new pb and when racerB has uploaded a new hotlap.

I subsribe to those events with the requests
?subscribe=pb&racer=racerA
and
?subscribe=hl&racer=racerB

Then I have to poll for changes in my subscribed stats with the request
?check_subscription

If for example racerA has set a new pb, check_subscription returns
PB racerA

and if racerA has set a new pb AND racerB has uploaded a new hotlaps, check_subscription returns
PB racerA
HL racerB

(if no changes, check_subscription could return.. "no changes".. )

A subscription system would make it less painfull to deal with multiple stats. Instead of downloading all my teammates pb, hl and pst say every hour, this way I could just poll for changes and just download the stats that have actually changed. Would save me (and lfsworld) a lot of statdata bandwith.

Is it possible to implement this system (or a variant) in the future?
for pubstats you mean?

And about bandwidth - again, I'm not really worried about that - I'm more worried about db-queries, which would increase with this subscription thing.

bit OT :
Just compare our forum server with our other server which hosts www.liveforspeed.net , www.lfsworld.net , all the downloadable skins, stats processing, insim relay, etc. The forum server only runs one website and in peak times, is loaded heavily : because vb uses a _lot_ of database queries. Our other server can serve more clients than the forum server can, even though that other server runs much more software! That's why I'm always 'nagging' about db queries, more than bandwidth. Just thought I'd explain that a bit - I'm really careful with db queries. So one doesn't have to bring bandwidth as a pro when suggesting something

but oh yeah, I'll have a think about it. It sounds like a nice feature.
Quote from Victor :for pubstats you mean?

uhm yes...

Quote from Victor :And about bandwidth - again, I'm not really worried about that

Well, I use the untarpitted service, so I am..

(well, "worried" is a bit strong since the amounts we're talking about is nothing that will make me poor, but we're trying to keep the costs of running the team to a minimum so every penny counts)

Quote from Victor :but oh yeah, I'll have a think about it. It sounds like a nice feature.

Cool!
hey victor,
is it possible to get only a specific team data entry?
don't know if requested before...

maybe it is possible like that:
?action=teams&name=Octrin.Racing

so u only get the data for Octrin.Racing

or is this again an issue of to many database queries?
next question/request (may asked befor, don't know, so sorry, if was requesed before):

is it possible to get the splits of PBs and HLs too (not only the time)?
Quote :Is it possible to get the splits of hls/pbs too, not only the times

AFAIK not. If you want hotlap splits then parsing replays is the way to go, but getting the splits of a pb is impossible IIRC...
I just wanted to pop back into this thread and thank Victor for sorting out the problem with the proxy IP address so quickly. You work is very much appreciated

If anyone is interested, I wrote the following page a couple of weeks ago, and have been tweaking it since. It compares the online lap times of the team I'm in and highlightes the best lap time.

http://www.sonicrealmsracing.co.uk/pages/compare.php


PS I didn't design the site!
Quote from CrazyICE :next question/request (may asked befor, don't know, so sorry, if was requesed before):

is it possible to get the splits of PBs and HLs too (not only the time)?

online pb's - no, i just don't store their splits

hl-splits , can consider that for next version (could start working on that soon - there are some updates waiting now)
Ages ago I suggested to show the wplits when you type /w wr. I would really like to see that, even though I dont remember what you said back then (if its possible).
i'm thinking it wouldn't fit on 1 line and i really don't like spamming multiple lines.

FGED GREDG RDFGDR GSFDG