Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #15  
Old 03-30-2012, 03:19 AM
Noport
Opcode Ninja
 
Join Date: Mar 2009
Location: San francisco
Posts: 426
Default

If you have a website for your users to login install Apache and php use this below i dug this up from May 2007 was posted on cavedude site
Code:
<?php
/*******************************************
*      Aerewen's Uber Fake Pub Server      *
*         Why? Because we can :oD          *
********************************************

I will be providing no support for this utility as it
was originally created for use on my server only, but I
wanted everyone else to be able to share their PEQ servers
with friends in an easy-to-use manner. This tool will
prevent you from having to manually update the database
account table.

Put this page on your site after setting the variables below to
the information of the MySQL database with the PEQ info in it.
*/
$DB_ADDY = "localhost"; //address:port for the MySQL server
$DB_USER = "root"; //username to login to MySQL with
$DB_PASS = "mypassword"; //password to login to MySQL with
$DB_DB = "peq"; //database name to use "peq" for default installation

$server_name "Name of Your Server"; //set the name of your server here
$admin_level = 250; //default level of admin to give to people who sign up
//This WILL NOT modify admin of people logging in to the server.

/*
Have your friends access this page on the webserver, enter a 
username/password to create an account, and click Login/Create.
This will create their account with the level of access specified
in $admin_level. It will then detect the IP address they accessed
the page from, and update the account table with that IP.

Before connecting to your PEQ server, you should always have people
login from this page to update their IP if needed.
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo $server_name; ?> PEQ Server Authentication</title>
<style type="text/css">
<!--
body,td,th {
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 14px;
	color: #CCCCCC;
}
body {
	background-color: #000000;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {font-size: 9px}
.formelements {
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	line-height: normal;
	font-weight: normal;
	font-variant: normal;
	color: #FFFFFF;
	background-color: #333333;
	border: thin solid #666666;
}
a {
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 14px;
	color: #CCCCCC;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #CCCCCC;
}
a:hover {
	text-decoration: underline;
	color: #CCCCCC;
}
a:active {
	text-decoration: none;
	color: #CCCCCC;
}
.style4 {font-size: 10px}
-->
</style>
</head>

<body>
<div align="center"><?php
if(!isset($_POST['Submit'])){
?>
  <form id="form1" name="form1" method="post" action="index.php">
    <table width="500" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="174" align="right" valign="top"><div align="right">Username:&nbsp;&nbsp;</div></td>
        <td width="326" align="left" valign="top"><input name="username" type="text" class="formelements" id="username" size="40" maxlength="9" />
        <br />
        <span class="style1">*must be 9 characters or less</span> </td>
      </tr>
      <tr>
        <td align="right" valign="top"><div align="right">Password:&nbsp;&nbsp;</div></td>
        <td align="left" valign="top"><input name="password" type="password" class="formelements" id="password" size="40" maxlength="9" />
          <br />
          <span class="style1">*must be 9 characters or less</span></td>
      </tr>
      <tr>
        <td colspan="2" align="center" valign="top"><input name="Submit" type="submit" class="formelements" value="Login/Create" />&nbsp;&nbsp;&nbsp;<input name="Reset" type="reset" class="formelements" value="Clear" /></td>
      </tr>
    </table>
  </form>
<?php
} else {
	//set font color
	$link = mysql_connect($DB_ADDY,$DB_USER,$DB_PASS);
	mysql_select_db($DB_DB,$link);
	$sql = "SELECT * FROM `account` WHERE `name` = '". $_POST['username']. "'";
	$res = mysql_query($sql,$link);
	if(mysql_num_rows($res) != 0){
		//username was found
		$info = mysql_fetch_assoc($res);
		if($info['password'] == $_POST['password']){
			//password matches
			if($_SERVER['REMOTE_ADDR'] != $info['minilogin_ip']){
				//ip address has changed
				$sql = "UPDATE `account` SET `minilogin_ip` = '". $_SERVER['REMOTE_ADDR']. "' WHERE `name` = '". $_POST['username']. "' AND `password` = '". $_POST['password']. "'";
				$sql2 = "UPDATE `account` SET `minilogin_ip` = '0.0.0.0' WHERE `minilogin_ip` = '". $_SERVER['REMOTE_ADDR']. "'";
				if(($res = mysql_query($sql2,$link)) && mysql_query($sql,$link)){
					echo '<font color="#00FF00">';
					echo 'Your IP address was successfully updated. You may now start EverQuest Titanium Edition and log in to the server.';
					echo '</font>';
				} else {
					echo '<font color="#FF0000">';
					echo 'There was an error updating your IP address. Please try again later or contact an admin for assistance.';
					echo '</font>';
				}
			} else {
				//ip didnt change
				echo '<font color="#00FF00">';
				echo 'Your IP address has not changed. You may now start EverQuest Titanium Edition and log in to the server.';
				echo '</font>';
			}
		} else {
			//password was wrong
			echo '<font color="#FF0000">';
			echo 'The username: '. $_POST['username']. '<br />Already exists in our database, and the password<br />you entered for it was incorrect.<br />';
			echo 'If this is your account, please <a href="index.php">go back</a>, re-enter your password, and try again.<br />';
			echo 'If you were attempting to create a new account, please try a different user name.';
			echo '</font>';
		}
	} else {
		//username was not found create it now
		$newno = "SELECT `id` FROM `account` ORDER BY `id` DESC LIMIT 1";
		$res = mysql_query($newno,$link);
		$newno = mysql_fetch_assoc($res);
		$newno = ($newno['id'] + 1);
		$sql = "INSERT INTO `account` VALUES (". $newno. ",'". $_POST['username']. "','',0,'". $_POST['password']. "',". $admin_level. ",". $newno. ",0,0,'". $_SERVER['REMOTE_ADDR']. "',0,0)";
		$sql2 = "UPDATE `account` SET `minilogin_ip` = '0.0.0.0' WHERE `minilogin_ip` = '". $_SERVER['REMOTE_ADDR']. "'";
		if(($res = mysql_query($sql2,$link)) && mysql_query($sql,$link)){
			echo '<font color="#00FF00">';
			echo 'New account created successfully. You may now start EverQuest Titanium Edition and log in to the server using:<br />';
			echo 'Username: '. $_POST['username']. '<br />Password: '. $_POST['password']. '<br />*username and password are case sensitive!';
			echo '</font>';
		} else {
			echo '<font color="#FF0000">';
			echo 'There was an error while trying to create your account. Please try again later.';
			echo '</font>';
		}
	}
}
?><br /><br />
<span class="style4">Before logging in to our server, please make sure you have downloaded the eqhost.txt and copied it into your EverQuest directory.<br />
For a new copy of eqhost.txt, right click <a href="eqhost.txt" class="style4">This Link</a> and
choose &quot;Save Target As&quot;.<br />
This file will replace the existing one in your EverQuest directory, which defaults to: C:\Program Files\Sony\EverQuest\<br />
If you need any assistance, please contact an admin.<br />All content is protected under the GPL. Scripts are &copy;2007 Icesnake Web Solutions, LLC</span></div>
</body>
</html>
Edit eqemu_config.xml
Code:
		<!-- Loginserver information.  DO NOT EDIT -->
		<loginserver>
			<host>eqlplogin1.com</host>
			<port>5999</port>
			<account>xxxxxxx</account>
			<password>xxxxxx</password>
		</loginserver>
Enter the same Username and password you put in tblserveradminregistration under peqlogindb
Don't forget to edit C:\Windows\System32\drivers\etc\hosts
Your welcome Warking! I enjoy seen chrsschb flip his desk over heheha 80)
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:37 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3