24.01.2010, 16:24
Tutorial has changed!
♦Introduction
Hi everyone!
You may know me as the maker of SampTool.
That was one of my very first PHP projects.
Nowadays I’m more interested of the MySQL part in PHP.
With that on one side of my mind and SA-MP on the other, I thought by myself ''Why not make something which includes PHP, MySQL and Pawn?''
That’s where the idea IP Database came from.
♦Functions
It saves every IP address from a player which connects to the server, to a MySQL Database, even if they connected before (To track IP changes).
The saved IP's will be shown on the PHP page, which is included in the package.
When people try to guess your rcon, the IP is shown in the server_log.txt, then you can compare it to the IP database to check if it’s a player which may has used another name.
Or sometimes when a player tries to fake an admin, you can see which player that is.
♦Requirements
1. Download the files from here (Click me), if you haven’t done that already
2. Unzip it to any location of your choice.
3. Open 'ipdatabase.pwn' with Pawno
4. Replace the information on line 4, 5, 6 and 7 by your MySQL connection info.
5. Press F5 to compile it.
6. Go to phpMyAdmin of your MySQL server.
7. Create the database you have chosen on line 7 of your 'ipdatabase.pwn'
8. Click on 'Import' located on the upper side
9. Click 'Browse'.
10. Locate the folder where you extracted the downloaded content.
11. Double click on 'database.sql'.
12. Press 'Go'
13. Close phpMyAdmin.
14. Go to your folder where you extracted the downloaded contents.
15. Upload/Move your script to the 'filterscripts' folder.
Go to 16A if you have your server hosted at ServerFFS, if not go to 16B
16A. Go to your server configuration, enable 'ipdatabase', and save your configuration.
16B. Open up server.cfg add 'ipdatabase' at the filterscripts line, save the file.
17. Restart your server.
18. Go to your folder where you extracted the downloaded contents.
19. Open 'config.php' with any text editor of your choice.
20. You will see
21. Change the information which you have given earlier in step 4, and change $perpage = 10; to the amount of records you want to show.
22. Save it!
23. Upload it to a web server (Website).
24. Go to your location where you uploaded the 'index.php' file!
25. All done, now when a player joins it automatically comes up on the web page!
♦Change log (Green means good, Red means bad)
V0.1
v0.1
v0.2
You are not allowed to re-release this elsewhere without my permission.
Greets,
Mujib
♦Introduction
Hi everyone!
You may know me as the maker of SampTool.
That was one of my very first PHP projects.
Nowadays I’m more interested of the MySQL part in PHP.
With that on one side of my mind and SA-MP on the other, I thought by myself ''Why not make something which includes PHP, MySQL and Pawn?''
That’s where the idea IP Database came from.
♦Functions
It saves every IP address from a player which connects to the server, to a MySQL Database, even if they connected before (To track IP changes).
The saved IP's will be shown on the PHP page, which is included in the package.
When people try to guess your rcon, the IP is shown in the server_log.txt, then you can compare it to the IP database to check if it’s a player which may has used another name.
Or sometimes when a player tries to fake an admin, you can see which player that is.
♦Requirements
- A SA-MP Server with MySQL plugin installed and working
- Webhosting with PHP installed and working
- A MySQL Database
1. Download the files from here (Click me), if you haven’t done that already
2. Unzip it to any location of your choice.
3. Open 'ipdatabase.pwn' with Pawno
4. Replace the information on line 4, 5, 6 and 7 by your MySQL connection info.
5. Press F5 to compile it.
6. Go to phpMyAdmin of your MySQL server.
7. Create the database you have chosen on line 7 of your 'ipdatabase.pwn'
8. Click on 'Import' located on the upper side
9. Click 'Browse'.
10. Locate the folder where you extracted the downloaded content.
11. Double click on 'database.sql'.
12. Press 'Go'
13. Close phpMyAdmin.
14. Go to your folder where you extracted the downloaded contents.
15. Upload/Move your script to the 'filterscripts' folder.
Go to 16A if you have your server hosted at ServerFFS, if not go to 16B
16A. Go to your server configuration, enable 'ipdatabase', and save your configuration.
16B. Open up server.cfg add 'ipdatabase' at the filterscripts line, save the file.
17. Restart your server.
18. Go to your folder where you extracted the downloaded contents.
19. Open 'config.php' with any text editor of your choice.
20. You will see
Code:
<?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'prolan'; $dbname = 'ipdatabase'; $perpage = 10; ?>
22. Save it!
23. Upload it to a web server (Website).
24. Go to your location where you uploaded the 'index.php' file!
25. All done, now when a player joins it automatically comes up on the web page!
♦Change log (Green means good, Red means bad)
V0.1
- Released!
- Saves all IP's
- Also saves NPC IP's
- Doesn't save NPC's IP anymore
- PHP Page update, now comes with a config.php for easy configuration.
- It automatically makes a new page when there are more rows per page, then setup in the config.php
v0.1
v0.2
You are not allowed to re-release this elsewhere without my permission.
Greets,
Mujib