Jump to content

[Tool][Realease 1.0] ZupaStats


Zupa

Recommended Posts

Got it working, amazing app, perfect use for angular well done! If you're taking feedback, I was thinking that some people might not want the uid show/linking to the player profile. Is there anyway for me to easily change this so that the player name is the link with no uid shown? 

 

Only just reading into angular but my idea is that I can create <a> on the player name with the ng-click? (basic idea)

Link to comment
Share on other sites

Got it working, amazing app, perfect use for angular well done! If you're taking feedback, I was thinking that some people might not want the uid show/linking to the player profile. Is there anyway for me to easily change this so that the player name is the link with no uid shown? 

 

Only just reading into angular but my idea is that I can create <a> on the player name with the ng-click? (basic idea)

 

Ya thats how it's currently build, What u can do easely is go into the player.html and just make the file empty or place a text "Not available on our server". If the profile loads then it just displays that.

If u don't want to PUID to display then go into the html pages where it is showed, the variable is called .puid ^^

 

I'll make some config options for next version.

Link to comment
Share on other sites

Any suggestions regarding the error logs I mentioned Zupa?

 

Here's the PHP info for my website. Maybe there's something in there that you would notice that indicate a problem? http://gator4148.hostgator.com/~killinze/phpinfo.php

 

http://killinzedz.net/ZupaStats/server/getNoLogDeathLogs.php?date=1423693348112

 

the redis connection gets refused by your server

Link to comment
Share on other sites

Ya thats how it's currently build, What u can do easely is go into the player.html and just make the file empty or place a text "Not available on our server". If the profile loads then it just displays that.

If u don't want to PUID to display then go into the html pages where it is showed, the variable is called .puid ^^

 

I'll make some config options for next version.

Thanks i'll give it a go, config options would be a great addition. Keep up the good work :)

Link to comment
Share on other sites

http://killinzedz.net/ZupaStats/server/getNoLogDeathLogs.php?date=1423693348112

 

the redis connection gets refused by your server

 

So the Redis server is refusing the connection from my webserver? I've already put in a ticket to Very Hosting asking about this because I can connect with the desktop tool, so I see no reason why my webserver shouldn't be able to connect.

Link to comment
Share on other sites

So the Redis server is refusing the connection from my webserver? I've already put in a ticket to Very Hosting asking about this because I can connect with the desktop tool, so I see no reason why my webserver shouldn't be able to connect.

 

Ahm im not an expert on that field but:

 

1) Is your redis port correctly in the php? cus 2406 is a weird one imo ^^

 

is there maybe whitelisting of ip's on the redis?

Link to comment
Share on other sites

Ahm im not an expert on that field but:

 

1) Is your redis port correctly in the php? cus 2406 is a weird one imo ^^

 

is there maybe whitelisting of ip's on the redis?

 

The port is correct. It's the same port I use for the Redis desktop tool and I don't believe there's a whitelist because Vert Hosting enabled remote connections to the database so I could use the desktop tool and they did not request my IP. I am still waiting for them to reply to my ticket.

Link to comment
Share on other sites

 

Or change it to this, to get more error logs

<?php
header('Access-Control-Allow-Origin: *');
ini_set('memory_limit', '-1');

error_reporting(-1);
ini_set('display_errors', 'On');

 

Hello, i try to install you're awesome work :D but i have no data on my website and when i change getNoLogDeathLogs.php with this code i obtain :

 

Notice: Trying to get property of non-object in C:\xampp\htdocs\ozi-epoch\server\getNoLogDeathLogs.php on line 11 

 

Any idea ? 

My database is on the same server as my arma server on a xampp tools.

 

Thx ! 

Link to comment
Share on other sites

Hello, i try to install you're awesome work :D but i have no data on my website and when i change getNoLogDeathLogs.php with this code i obtain :

 

Notice: Trying to get property of non-object in C:\xampp\htdocs\ozi-epoch\server\getNoLogDeathLogs.php on line 11 

 

Any idea ? 

My database is on the same server as my arma server on a xampp tools.

 

Thx ! 

 

u edited the config correctly?

Link to comment
Share on other sites

u edited the config correctly?

 

i think so my conf.php : 

 

<?php
 
$myRedisPass = "mypassword";
$myRedisPort = 6379;
$myRedisHost = '127.0.0.1';
 
$serverlist = '[
{"community":"Ozi-Lan","name": "Ozi-Lan Epoch Server", "dbi": "0", "map":"altis","descr": "EpochMod |Altis |Mission & Ai City |Extra loot | Safe Base| JSRS3"}
 
 
 
 
 
 
]';
 
/*
 * Fill in the config correctly. If redis is on another ip change this aswell and see that redis accepts externall connections than.
 *
 * To add servers look at the example. DBI = database nummer
 * NO COMMA behind the last server
 */
 
 
?>
 
my redis conf in EPOCH : 
 
[Redis]
IP = 127.0.0.1
Port = 6379
DB = 0
Password = mypassword
Link to comment
Share on other sites

 

<?php

header('Access-Control-Allow-Origin: *');
ini_set('memory_limit', '-1');
 
error_reporting(-1);
ini_set('display_errors', 'On');
 
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
 
$db = $request -> db; <- Line 11
 
require 'Predis/Autoloader.php';
 
require 'config.php';
 

 

the db request :( 

 

$db = $request -> db;

Link to comment
Share on other sites

<?php
header('Access-Control-Allow-Origin: *');
ini_set('memory_limit', '-1');

error_reporting(-1);
ini_set('display_errors', 'On');

$postdata = file_get_contents("php://input");
$request = json_decode($postdata);

$db = $request -> db;

require 'Predis/Autoloader.php';

require 'config.php';

Predis\Autoloader::register();

$client = new Predis\Client([
    'host'   => $myRedisHost,
    'password' => $myRedisPass,
	'port' => $myRedisPort,
	'database' => $db
]);

$deathlogs  = $client-> llen('deathlog-LOG');
$deathlogs2 = $client-> lrange('deathlog-LOG', 0, $deathlogs);

$dl = [];

foreach($deathlogs2  as  $log){

    $result = [];

    $exploded = explode(" ",$log,3);

    $result['time'] = $exploded[0] . " " . $exploded[1];

    $exploded2 = explode("(",$exploded[2],2);

    $result['killername'] = trim($exploded2[0]);

    $exploded3 = explode(")",$exploded2[1],2);

    $result['killerpuid'] = trim($exploded3[0]);

    $exploded3[1] = str_replace(" killed ","",$exploded3[1]);

    $exploded4 = explode("(",$exploded3[1],2);

    $result['killedname'] = trim($exploded4[0]);

    $exploded5 = explode(")",$exploded4[1],2);

    $result['killedpuid'] = trim($exploded5[0]);

    $exploded5[1] = str_replace(" with weapon","",$exploded5[1]);

    $result['weapon'] = trim($exploded5[1]);

    array_push($dl,$result);
}


echo json_encode($dl);

getNoLogDeathLogs.php

 

Thx :)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...