• 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!

PHP Config

tatiana

Sexy Girl
Joined
Mar 30, 2009
Messages
201
Reaction score
5
Location
Brazil
PHP:
<?php
function file_crc($file)
{
    $file_string = file_get_contents($file);

    $crc = crc32($file_string);
   
    return sprintf("%u", $crc);
}


$spr = '/var/www/update/k.spr';

echo 'k.spr '.file_crc($spr).'';

?>

Someone how it works? If I can add more .pic and .dat?
 
Solution
Just read how arrays works, it's simple.

Something like:

PHP:
$ToUpdate = array('file.dat', 'file.spr', 'file.exe');

foreach ($ToUpdate as $file){
    echo $file.' '.file_crc($file).'<br>';
}
Hey do u guys know how to compiling a ot server like with source and stuff Im having issues with mine that you cant not load items you need another items some crap like that

well if u can can some one private msg me like inbox please need help
 
Last edited by a moderator:
My result with your code:

1.txt 404288374

My result with my code:
1.txt 404288374
2.txt 3177610041
3.txt 3287778386

jwoCnMg.jpg
 
I did everything right.
PHP:
<?php
function file_crc($file)
{
    $file_string = file_get_contents($file);

    $crc = crc32($file_string);
  
    return sprintf("%u", $crc);
}


$spr = array('Mortem740.spr', 'Mortem740.dat', 'Mortem740.pic');

foreach ($spr as $file){
    echo $file.' '.file_crc($file).'<br>';
}
?>
 
this is what i was looking for amazing !!

my client is now updating but i must know the protocol of the client
im trying to use old tibianic client any idea?
this is the error that i get when i tried to log in
i know it says 740-7.4 but that is a message that i added on the server that is 772
pls help i need just to log in
wL8AR3b.png
 
Last edited:
this is what i was looking for amazing !!

my client is now updating but i must know the protocol of the client
im trying to use old tibianic client any idea?
this is the error that i get when i tried to log in
i know it says 740-7.4 but that is a message that i added on the server that is 772
pls help i need just to log in
wL8AR3b.png
You must to add alot of stuff on distro :p Not only client ^^
 
You must to add alot of stuff on distro :p Not only client ^^
ye i know i will find a way :p

My result with your code:



My result with my code:


jwoCnMg.jpg
men im using this file but when people writes for example www.blabla.com/update/ they can download my files
i want to hide the link www.blabla.com/update/ or get redirect to my main website
help me pls

Shoudn't it be '/var/www/update/file.spr' etc?
Code:
<?php
function file_crc($file)
{
    $file_string = file_get_contents($file);

    $crc = crc32($file_string);

    return sprintf("%u", $crc);
}


$spr = array('Tibia.spr');

foreach ($spr as $file){
    echo $file.''.file_crc($file).'<br>';
}

$dat = array('Tibia..dat');

foreach ($dat as $file){
    echo $file.''.file_crc($file).'<br>';
}

$pic = array('Tibia.pic');

foreach ($pic as $file){
    echo $file.''.file_crc($file).'<br>';
}
?>

im looking for this too with @grilo13 's code is just updating one file could be spr/dat/or pic
depending on which one is first

i read little bit about of arrays but have no clue of how to use them, i understood just a little bit by do not say nothing :/
im trying to use old tibianic client it has auto updater so we or i need the versions.php file to get it working(auto-updater)

regards , help

Srry my bad i didn't noticed how this works but now i know and i must say that is working awesome !
client updating :) thanks you @grilo13 im in love of your code
rUxXMz1.png
 
Last edited by a moderator:
Back
Top