Jump to content
Sign in to follow this  
REDRUMRHY

Whitelister Program

Recommended Posts

AU/NZ BWHive PUBLIC - 119.81.31.13:3289

Just wondering if there's a whitelisting program that not only I can use for the Server.

Share this post


Link to post
Share on other sites
that not only I can use for the Server.

What do you mean by this?

Share this post


Link to post
Share on other sites

Sorry, When people not including me that are apart of the server can whitelist people.

Share this post


Link to post
Share on other sites

Sorry, When people not including me that are apart of the server can whitelist people.

You would need to give them access to the list of whitelisted users, I'm guessing that would mean they are receiving access to your control panel/ server files. If you run your own dedicated server you could give the players FTP access to the folder with the whitelist text file, or you could have a PHP coder write a web access panel for it somehow... Not really sure TBH. Edited by Beck
  • Like 1

Share this post


Link to post
Share on other sites

the guy above is correct you can give them access from a dedicated server to the text file or if you set the whitelister to use mysql you can set up a php webpage using mysql connect and create a form that inserts the data into the table from a webpage

Share this post


Link to post
Share on other sites

the php would go something like this you would have two pages one insert.php and the other would be the whitelist.html first the whitelist.html

whitelist.html



<html>
<body>
<form action="insert.php" method="post">
Firstname: <input type="text" name="comments">
Guid: <input type="text" name="guid">
<input type="submit">
</form>
</body>
</html>

now insert.php


<?php
// mysql connection details
$dbhost = 'localhost:3036';
$dbuser = 'root';
$dbpass = 'rootpassword';
$dbname = 'dayz';
$con = mysql_connect($dbhost, $dbuser, $dbpass);
// Check connection

if (mysql_errno($con))
{
echo "Failed to connect to MySQL: " . mysql_connect_error();
}
mysql_select_db($dbname);
$sql="INSERT INTO whitelist (guid, comments)
VALUES
('$_POST[comments]','$_POST[guid]')";
mysql_query("CREATE TABLE IF NOT EXISTS `whitelist` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`guid` varchar(32) NOT NULL,
`comments` varchar(500) DEFAULT NULL,
PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;",$con);
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error($con));
}
echo "$_POST[comments] is whitelisted";
mysql_close($con);
?>

EDIT multiple typos :)

this does work to insert guid into the database for the whitelister its best to let this create the table for the whitelister as the one that comes with it does not have auto increment on it

hope this helps

Edited by AmberHelios

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×