Jump to content

BfBC2 Chat GUID and Stats Logger Webstats v1.21 [BC2]


ImportBot

Recommended Posts

Originally Posted by BB-Insomnia*:

 

JLNN

Off-Topic: You should use the latest version of BC2Conn, not the very old one which included a "message" in the HTML sourcecodes. Get it here: http://bc2conn.sourceforge.net/

I added the map list from your latest version. full update will come soon. Thank your for your advice!

 

Is this the same code used for the Wolfcon stats? I noticed it's the same package, but wondered if some stuff was different in PRoCon.

It is not, its based on it but i changed a lot.

The next version will be completely new coded

* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 284
  • Created
  • Last Reply

Top Posters In This Topic

Originally Posted by Xtrem*:

 

what's wrong ?

 

[11-Aug-2010 14:14:44] PHP Fatal error: Call to undefined function phpheader() in /home/phs/public_html/addons/XXXX/procon/sig.php on line 1

 

 

Code:

<_phpheader("Content-type: image/png");include('config.inc.php');if(empty($_GET['p'])){$_GET['p']="=BB=Insomnia";}$connection=mysql_connect($mysqlhost, $mysqluser, $mysqlpwd) or die ("Connection could not be established.");mysql_select_db($mysqldb, $connection) or die("Could not find Database.");$sql = "SELECT * FROM tbl_playerstats WHERE  `Soldiername` =  \"".$_GET['p']."\" ";$result = mysql_query($sql);while ($stats = mysql_fetch_array($result)) {        $kills=$stats['playerKills'];        $deaths=$stats['playerDeaths'];        $score=$stats['playerScore'];        $rounds=$stats['playerRounds'];}$font="font/comic.ttf";$fontbd="font/comicbd.ttf";$server="Ballerbude Blood-Boys HC Ranked";$img = imagecreatefromjpeg($sig_image);$Hintergrundfarbe = imagecolorallocate($img, 0, 0, 0); $col = imagecolorallocate($img, 255, 255, 255); $col_f = imagecolorallocate($img, 255, 255, 255); $col_server = imagecolorallocate($img, 255, 255, 255); $col_kd = imagecolorallocate($img, 255, 0, 0); $h1=imagettfbbox(8,0,$font,$_GET['p']);$width_h1=$h1[2] - $h1[0];$h1_x=(400-$width_h1)/2;imagettftext($img, 10, 0, $h1_x, 15, $col, $fontbd, $_GET['p']);imagettftext($img, 8, 0, 65, 30, $col, $font, 'Score: '.$score);imagettftext($img, 8, 0, 65, 50, $col, $font, 'Rounds played: '.$rounds);imagettftext($img, 8, 0, 275, 30, $col, $font, 'Kills: '.$kills);imagettftext($img, 8, 0, 275, 50, $col, $font, 'Deaths: '.$deaths);imagettftext($img, 14, 0, 170, 45, $col, $font, 'K/D: '.round($kills/$deaths,2));imagettftext($img, 8, 0, 5, 75, $col_server, $fontbd, $server);// NO CHANGES FROM HERE!!!!$foo=imagettfbbox(8,0,$font,"blood-boys.de");$width_foo=$foo[2] - $foo[0];$foo_x=395-$width_foo;imagettftext($img, 8, 0, $foo_x, 75, $col_f, $font, "blood-boys.de");imagepng($img);_>
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by JLNNN*:

 

German text: Er kennt die Funktion phpheader() nicht - ist ja auch klar, weil sie nicht existiert und nicht definiert wurde. Das hat eine ganz einfache Ursache: Dir fehlt ein Leerzeichen zwischen <_php und der header also in den ersten sechs zeichen.>

 

- JLNNN

 

PS: Who made this script? It's very easy to use SQL-Injection with it. VERY bad code for example:

 

$sql*=*"SELECT***FROM*tbl_playerstat  s*WHERE*`Soldiername`*=*\""*.*$_GET['p']*.*"\"";*[/code:3getzz60]

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by GrossKopf*:

 

PS: Who made this script? It's very easy to use SQL-Injection with it. VERY bad code for example:

 

$sql*=*"SELECT***FROM*tbl_playerstat  s*WHERE*`Soldiername`*=*\""*.*$_GET['p']*.*"\"";*[/code:2yv2q4k2]What does that mean?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by JLNNN*:

 

Example:

 

Imagine I edit the URL manually to this: http://bla.org/index.php_p=\"; DROP TABLE users;#

 

Then the parameter 'p' would be this:

 

\"; DROP TABLE users;#

 

If you request the value of $_GET['p'] and replace this with its value, then

 

$sql = "SELECT * FROM tbl_playerstats WHERE `Soldiername` = \"\"; DROP TABLE users;#\"";

 

So the executed mysql will be this:

 

mysql_query("SELECT * FROM tbl_playerstats WHERE `Soldiername` = \"\"; DROP TABLE users;#\"");

 

And now: Say goodbye to all your users :ohmy:

 

[This is just an example. Code has been made easier to read and may won't work]

 

- JLNNN

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Panther*:

 

Dear Programmer,

 

you may use

 

Code:

$hours=sprintf("%0d",($playertime/3600));
instead of

Code:

$hours=($playertime/3600)%60;
because if a player played more than 60hours, the time is not printed correctly to the homepage with:

Code:

$hours=($playertime/3600)%60;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by pssparkman*:

 

I've only just looked at this, but is there a way to customize the colors and tables?

 

Is there a way to tell the teams apart in the last chat entries, blue/red text maybe, and a way to identify what squad?

 

I also see in the killsteak table, it is mentioned '8 Kills in a row', what does that imply or how is that set?

 

Just some thoughts, but looking real good.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BB-Insomnia*:

 

I've only just looked at this, but is there a way to customize the colors and tables?

Atm only in directly in the php-codes.

(will be added to the new version, i think)

Is there a way to tell the teams apart in the last chat entries, blue/red text maybe, and a way to identify what squad?

Its seperated by Chat to all, chat to team, chat to squad.

BfBC2 Chat GUID and Stats Logger does not save which team or squad the chat is from.

I also see in the killsteak table, it is mentioned '8 Kills in a row', what does that imply or how is that set?

it's explained in the readme.txt or in the config.inc.php

you need a killstreak plugin, and activate the option log server spam in "BfBC2 Chat GUID and Stats Logger"

Just some thoughts, but looking real good.

thanks :-)
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Stryker412*:

 

I'm having an issue. My host provider installed two different stats programs so we could decide which one was better. One works, and unfortunately yours doesn't. I keep getting, "BC2Conn could not be established." The database itself is working fine since I can see stats on the other page.

 

Working:

http://addons.host4admins.com/Stryker41 ... /index.php

 

Not working:

http://addons.host4admins.com/Stryker41 ... /index.php

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BB-Insomnia*:

 

Yes, i am, but i am very very busy at the moment!

sorry about that!

 

without the config.inc.php i can't say what is wrong.

 

I am going to fix the known bugs and add weapon statistics as soon as possible.

But at the moment i have to work my ass off to pay the bills for the renovation of my soon 30 years old Porsche :-)

 

Donations welcome by the way :biggrin:

 

If you post your configs without passwords, i could check if no errors are in there.

 

Cya soon!

 

Inso

* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 weeks later...
  • 2 weeks later...

Originally Posted by HelloKitty*:

 

this has nothing to do with the official ranking.

 

"Connection could not be established."

..means that your webscript can not connect to your sql database... check your "config.inc.php" for the correct settings. Be sure that your sql database is accessable.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 weeks later...

Originally Posted by slekkas*:

 

Thank you for making this program, it works great. The only think i haven't manage to do is to get the sig to appear. In the description you say:

$sig_path="http://your.domain.com/bc2stats"; // Path to your Statspage

 

I dont have the bc2stats folder in my website. could you tell me where i can find it so i can install it?

 

I tried entering the address where i put your program but i get this message with no image

 

Signature

Forum link to Image:

http://www.leagueofkarpathos.gr/server/sig.php_p=Killer%20Sotos

 

You can see your self at www.leagueofkarpathos.gr/server

 

Thank you

* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 weeks later...

Originally Posted by HelloKitty*:

 

The link in your config seems to be correct. I think you are missing "curl" to show the images. "curl" is some php function afaik. This link http://www.tonyspencer.com/2003/10/22/c ... n-windows/ helped me to get it to work.

 

And another hint: The performance of the site is very slow: I guess u use an xamp apache/sql installation on a lokal homeserver ...? I had the experience that using an external sql database speeded up everything a lot! I use http://www.freesqldatabase.com for it

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by slekkas*:

 

The link in your config seems to be correct. I think you are missing "curl" to show the images. "curl" is some php function afaik. This link http://www.tonyspencer.com/2003/10/22/c ... n-windows/ helped me to get it to work.

 

And another hint: The performance of the site is very slow: I guess u use an xamp apache/sql installation on a lokal homeserver ...? I had the experience that using an external sql database speeded up everything a lot! I use http://www.freesqldatabase.com for it

I switched to www.freesqldatabase.com and indeed it loads a lot faster. Now for the first part i really dint understand anything in this tutorial. The webstats is located at my host so i cannot do any modifications there. It must be something else. I would like to be able to get those images.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HelloKitty*:

 

Do you have acces to your "php.ini" config file? (RDP of FTP _)

 

you need to Uncomment the curl line in your php.ini file to enable curl: "extension=php_curl.dll"

 

If you have no acces, ask your provider to enable "curl functions for php"

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by slekkas*:

 

Do you have acces to your "php.ini" config file? (RDP of FTP _)

 

you need to Uncomment the curl line in your php.ini file to enable curl: "extension=php_curl.dll"

 

If you have no acces, ask your provider to enable "curl functions for php"

I think I do. What should I do there?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by slekkas*:

 

And another hint: The performance of the site is very slow: I guess u use an xamp apache/sql installation on a lokal homeserver ...? I had the experience that using an external sql database speeded up everything a lot! I use http://www.freesqldatabase.com for it

No i remember why i had to install mysql locally on my computer. When i used mysql on my host provider procon used to crash every time a round ended. Never figured out why. i though it had to do something with the version or the setup of the mysql that my host has installed. After i started using the local db no more procon crashing. I will also post at the BfBC2 Chat, GUID, Stats and Mapstats Logger[2.0.6.2] topic to see if they can help me but since you are also using it maybe you have an idea about what i can do.
* Restored post. It could be that the author is no longer active.
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.