How to Add a Download Counter to A Self-Hosted Cydia Repo
This is a fork of kirb's repo download counter, only that this one works and that one doesn't.
- Click the download link at the top of the gist page to save these files to your machine.
- Unzip them and open
nginx.confin your favorite non-Notepad text editor.
- In counter.php, scroll down to the line that says
$db = mysqli_connect( ...and change the parameters to the ones you use to connect to MySQL.
- If your database doesn't use the UTF-8 charset, change the
if (!mysqli_set_charset($db, "UTF8")) ...line to the appropriate value.
- Go down to the
if (!mysqli_select_db($db, "myrepodb")) ...line and change
myrepodbto the name of your database.
- Run the