How do I show on my sitesome stats from every player

0 favourites
  • 4 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • For example : i want to show on my website how many time my game was ended, or how many times peoples die.

    I have already made a page with false stats here (everything is in french but that doesn't matter if you don't understand anything, it's just to show an example) :http://afranchcoder.comuf.com/Randomizor%202/Randomizor.html

    Can i simply use event or may i need a MySQL server ?

    I do not put example because I just want to know how can it be done? I would make it by miself.

  • Anyone ? Up pls

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Can i simply use event or may i need a MySQL server ?

    you need Ajax(in C2) to send "signal -I die"..php to add 1 to count and some place to store data..

    in this example I use text file to read & write data..but mysql database is better choice..

    fancy website

    http://korbaach.pixub.com/test/deathCounter.html

    php&txt file

    deathCounter.txt

    deathCounter.php

    <?php
     
    $file = ('deathCounter.txt');
    $death = file($file);
    $death[0] ++;
     
    $fp = fopen($file , "w");
    fputs($fp , "$death[0]");
    fclose($fp);
    echo $death[0];
    exit();
    ?>
    [/code:197hshgk]
    
    in deathCounter.html
    [code:197hshgk]<h2>Morts au total  =  <?php
    echo file_get_contents("http://korbaach.pixub.com/test/counter/deathCounter.txt");
    ?></h2>[/code:197hshgk]
    
    [url=https://app.box.com/s/pmca18j6qn9vom53mg6te3yjl53myicr]deathCounter.capx[/url]
    
    open capx ..check death count on web page..kill player..refresh deathCounter.html page..
  • Ok thx

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)