• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Suggestion Last stable TFS in txt file

Pvls

kcuf
Joined
Sep 19, 2007
Messages
74
Reaction score
2
Location
Wroclaw
GitHub
PJanisio
My suggestion is directed to administrators of otland.net. It will be nice if you will create txt file, f.e version.txt and always paste in content newest stable version of The Forgotten Server.

Why i suggest this?

I`m administrator of otsoft.pl - polish open tibia support and i want to make some dynamic news about newest stable version of TFS on my index, so if the txt file will be on server i can easily display information about ver. on my site without changing site code. Theres nice function in php which can do everything for me without me ;)

In txt file can be also id of thread (after the comma) where newest version is avaible to download, so the link on my site can provide exact url to thread with download.

I think, that could help not only me, so consider my suggestion and give the answer :)

Yours,
Pavlus
 
http://forgottenserver.otland.net/version
Semicolon is used as separator, url to be used with threadid: http://otland.net/showthread.php?t=<threadid>.

If you prefer another format for the file, just tell me and I'll change it.
 
I think better will be:

stable;0.2;pl14;10141;

To make main version tag separated also or simple stable;0.2.14;10141;

File format is ok. Thanks for reply.
 
Changed it to:
stable;0.2;pl14;10141;
 
Thanks.

So if somebody want to display this info you can llok at this simple function:

PHP:
function constructURL()

{
    
$location = "http://forgottenserver.otland.net/version"; 

                    $content = @file_get_contents($location);
                    
                            if($content)

            {

                        list($dev, $main_ver, $release, $thread_id) = explode(";", $content);

                                echo 'Najnowsza stabilna wersja: <a href="http://otland.net/showthread.php?t='.$thread_id.'">The Forgotten Server '.$main_ver.' '.$release.'</a>';
            }
else
{
    echo "N/A (Otland is not responding)";
}

return true; 
}

You can place this code on the beggining or in different file.

And if you want to display the result just paste this where you want link to be displayed:

PHP:
constructURL();

Code for unstable version is analogous.
 
Last edited:
Back
Top