The online racing simulator
LfS S2 Server Script
(127 posts, started )
Testing of the LFS World version which doesn't require HTTP or FTP access to your websever is in progress. If anyone else wants to participate to the testing, please just contact me by mail
There's no need for modification. You only need a webserver with PHP support. That's all.
To make one clear to everybody, I just received a mail this day (see below) that I would not provide any instructions on how to setup my script for a forum software.

Well: THIS IS A STAND-ALONE APPLICATION! I give you all instructions you need to set up the script and get it working. It is a stand-alone application to be as flexible as possible. If it would be a mod for a f... forum-software or something like this, it would only work with this single software and would need to be rewritten for every single CMS or forum software.
So, if you are too dumb, to know this and blame me for your missing knowledge on how to place a link to the script or embed it via an iframe, it is not my problem.

And I post this, because I'm not interested to get mails like this again..

Quote from Falcon140 :You give us 2 php files and that’s it



No ****ing instructions



Nothing



U say what to edit and then upload it.



You don’t say how to put it in the forum, or how to link it to the forum



Or anything



YOU'RE A ****ING DISGRACE!!!!!!!!!!!!!!!!!!!!!!!!

--
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.18/585 - Release Date: 12/13/2006 11:49 AM

Quote from VorTeX3k :Testing of the LFS World version which doesn't require HTTP or FTP access to your websever is in progress. If anyone else wants to participate to the testing, please just contact me by mail

I'd be interested, plz PM details or an email addy. Cheers
News about these scripts?

I've downloaded both, but nothing works.. The online racers say that it couldn't get data from LFS World due to an unknow problem, the server.php page says that it can't connect to the server to retrieve infos.

About _data_config.php, in a certain line u say that I have to put the path of the folder, right?

But, if i host the server on my personal pc, under Winzozz, and the lfs.exe host is under, ex: g:\LFS HOST\lfs.exe I have to put the entirely path, so G:\LFS HOST\ or something different?

Thanks 4 help, and Happy New Year to all!

Cr45h
Quote from Cr45h :News about these scripts?

I've downloaded both, but nothing works.. The online racers say that it couldn't get data from LFS World due to an unknow problem, the server.php page says that it can't connect to the server to retrieve infos.

About _data_config.php, in a certain line u say that I have to put the path of the folder, right?

But, if i host the server on my personal pc, under Winzozz, and the lfs.exe host is under, ex: g:\LFS HOST\lfs.exe I have to put the entirely path, so G:\LFS HOST\ or something different?

Thanks 4 help, and Happy New Year to all!

Cr45h

To the problem with the Server script: I think you misunderstand one point: The hostfile must be accessible via a FTP directory. So you need a FTP running on your live for speed server with the game directory (in your ex. g:\LFS HOST\) accessible via FTP. Afterwards you must configure the _data_config.php to access this FTP server (by entering the email address). The path that has to be entered is the relative path seen from the root of your FTP.
So if you configured you FTP to have g:\LFS HOST\ as root path, then you have to leave the $hostpath variable empty. if you for example configured g:\ as your ftp root, the $hostpath must be "/LFS HOST".


Regarding the RacerOnlineScript: Please check if you have a cache.txt file within the directory you run the script from. If not, check that this directory is writable for the webserver. If there is a cache.txt file, check what's written in there and how big it is. If it is much larger than some kb (eg. some MB) than we need to check this problem further, if the file is small and than some error message may be written in it.
If the file is created but is completely empty, check 2 things: Try to delete the file and create it manually, set the CHMOD to 777 (access rights writable). If this still does not help your PHP installation may block access to external URLs. This is done through the configuration variable allow_url_fopen. The script can only work if this is set to enabled. So check this within your php.ini.
Hm... For server script... It works very great!

But, about FTP....I don0t understand very well what it does instead of http... 'cause now i have the config file with no ftp specification, and, it works with no problems.

The FTP option what does if I activate it?

Anyway... congrats for script!!
If you use FTP, the script also accesses a FTP server, HTTP does the same but accessing the data through HTTP. Those are different protocols and runnning in different servers.
So for example if you have a default HTTP access configured to http://blah.test it may be configured in the HTTP server to point to the local directory "C:\webserver\http" whilst the same domain as FTP (so port 21) (ftp://blah.test) could be configured in the FTP server to point to "C:\ftp dir".
So it is no "must" that an address accessed via FTP or HTTP point to the same direction.

And thanks for the congrats
Small prob
Lets say a host starts an online game. It creates a hostxxxxx.txt file right?
But when the host leaves the game the hostxxxxx.txt file disappears. When this happens the output file "server.php" displays the error msg

Quote :<b>Warning</b>: fopen(......../host63392.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in <b>.../server.php</b> on line <b>165</b><br />

It writes this error (which is generated by the server)at the top of the output file, and it spoils the look of the output file,
this happens because of this line
Quote :$datei[$c] = fopen($filepath[$c], r);

Opening the file directly in this manner will return errors if the file is not present.
is there a way to modify the script such that is does not "open" the file but checks if it's there in the first place then outputs "Server is 'Online' or 'Offline' " instead of the php error message like the one mentioned above it really spoils the look of the output file
Will this script be updated for x30 or are you waiting for patch y?

not demanding a new version! Just wondering if it will be updated!
Dunno which version of the script I originally had, but with a few tweaks it works fine with X30 / X31 ...

http://www.sillyproject.com/liveforspeed/

X31 servers are at the bottom of the page ...

Direct access to the txt file as well, not http ...
Only thing I can't get is it to display FBM! some help please on the tweak to make this possible?


[Don't worry, I've managed to figure it out!]
Add this after SO5R ...


<?php 
 
if($track=="SO6")
  
$trackName "South City Chicane Route";
 if(
$track=="SO6R")
  
$trackName "South City Chicane Route Rev.";
?>

Add an extra 1 in the line of 1's ...


<?php 
function get_cars($cars$showAll$showLanguage)
{
 
$i 0;
 
$j 0;
 
$j2 0;
 if(
trim($cars)=="11111111111111111111" && $showInfo[4] == 1)
?>

Add the case 19 part for the FBM ...


<?php 
     
case 18:
      
$carlist .= "BF1";
      break;
     case 
19:
      
$carlist .= "FBM";
      break;
?>

Annndd, I think that's it, unless I've forgotten something ...
Thanks for your support ppl! I just released the new Version 1.9 containing DanielC's changes (thanks to you!).

I also added a small fix to avoid occuring wonderous' problem.

The download can be found here at sourceforge:
LFS ServerScript 1.9 Download @ Sourceforge
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\Program Files\xampp\htdocs\server\server.php on line 182

how to fix that ?
Quote from BOSCHO :Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\Program Files\xampp\htdocs\server\server.php on line 182

how to fix that ?

BOSCHO i had the same problem, i'm nor programmer and have little php skills but i think it has something to do with the script not being able to access the file.

I got around this by removing this line in server.php

$filepath[$c] = $serverprot[$c] . "://" . $ftpuser[$c] . ":". $ftppw[$c] . "@" . $serverip[$c] . $hostpath[$c] . "/host" . $lfsport[$c] . ".txt";

and putting this line in _data_config.php in the connention info for Server 1

$filepath[0] = "/lfs/host63392.txt";

I can do this as the php scripts are running on the same server as the LFS dedicated server (that may not be the case for you)


I also had to change;
die "File access error!";

for
echo "File access error!";
exit();

In server.php

Not really a fix, but certainly a work around!

Doowle
in old version i make
_data_config.php
/*************START SERVER 1*****************/
$hostpath[0] = "d:\\LFS_Y\\";
$lfsport[0] = "63333";
/*******************************************/

/*************START SERVER 2*****************/
//$hostpath[1] = "d:\\LFS\\";
//$lfsport[1] = "63392";
/*******************************************/

server.php
$serverCount = count($hostpath);
$c = 0;
while($c < $serverCount)
{
include setLanguage($showLanguage);
$filepath[$c] = $hostpath[$c] . "host" . $lfsport[$c] . ".txt";

-
(sun) DELETED by sun
-
(INeverGiveUp) DELETED by SamH : AMB
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/***/domains/***/public_html/server.php on line 182

Help
Can the second server's info be placed to the right of the first server instead of below it? It doesn't look like there is an easy way to do this, unless I have two copies of this script and do two separate php includes.
Quote from doowle :BOSCHO i had the same problem, i'm nor programmer and have little php skills but i think it has something to do with the script not being able to access the file.

I got around this by removing this line in server.php

$filepath[$c] = $serverprot[$c] . "://" . $ftpuser[$c] . ":". $ftppw[$c] . "@" . $serverip[$c] . $hostpath[$c] . "/host" . $lfsport[$c] . ".txt";

and putting this line in _data_config.php in the connention info for Server 1

$filepath[0] = "/lfs/host63392.txt";

I can do this as the php scripts are running on the same server as the LFS dedicated server (that may not be the case for you)


I also had to change;
die "File access error!";

for
echo "File access error!";
exit();

In server.php

Not really a fix, but certainly a work around!

Doowle

I have this problem too, but this fix no work for me..

Help me pls
Hello, how to set up script ?
Warning: file_exists(): connect() failed: No connection could be made because the target machine actively refused it. in C:\xampp\htdocs\tutorials\server.php on line 172
Server offline
Notice: Undefined variable: host in C:\xampp\htdocs\tutorials\server.php on line 276

Notice: Undefined variable: guests in C:\xampp\htdocs\tutorials\server.php on line 280

Notice: Undefined variable: hostname_clear in C:\xampp\htdocs\tutorials\server.php on line 282

Notice: Undefined variable: host in C:\xampp\htdocs\tutorials\server.php on line 282

Notice: Undefined variable: version in C:\xampp\htdocs\tutorials\server.php on line 282

Notice: Undefined variable: guests in C:\xampp\htdocs\tutorials\server.php on line 282

Notice: Undefined variable: maxguests in C:\xampp\htdocs\tutorials\server.php on line 282

Notice: Undefined variable: track in C:\xampp\htdocs\tutorials\server.php on line 282

Notice: Undefined variable: cars in C:\xampp\htdocs\tutorials\server.php on line 282

Notice: Undefined variable: qual in C:\xampp\htdocs\tutorials\server.php on line 282

Notice: Undefined variable: length in C:\xampp\htdocs\tutorials\server.php on line 282

Notice: Undefined variable: public in C:\xampp\htdocs\tutorials\server.php on line 282




Hello i have this eror, how to fix?

LfS S2 Server Script
(127 posts, started )
FGED GREDG RDFGDR GSFDG