[RELEASE] Updated PHP Register Script + Server Status

Joined
Oct 1, 2005
Messages
418
Reaction score
51
Need to say a thanks to Antv912 for the fixes and now i have fixed and added some things :D open register.php and setup the vars.

PHP:
    // Configurations
    $myhost="localhost"; // MySQL Host
    $mypass="test"; // MySQL User Passowrd
    $myuser="root"; // MySQL User
    $mydbacc="account"; // Eudemons Account Dtabase
    $mydbdata="my"; // Eudemons Server Database
    $serveraddress="127.0.0.1"; // Server IP Address
    $serverport=5816; // Server Port

Recommend to use in :D

\WINDOWS\php.ini edit as here or download mine:
Code:
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.

;extension=php_mbstring.dll
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_pdo.dll
;extension=php_pdo_sqlite.dll
;extension=php_winbinder.dll

After Edit your php.ini restart u apache server using this cmd in Start > Run:

Code:
net stop apache(or apache2.2, apache2.1, apache2)
net start apache(or apache2.2, apache2.1, apache2)

EDIT: Later i will edit it with some graphics :D
 

Attachments

Last edited:
which extensions do i need atm i enabled php_gd2.dll
and where do i need to place the file atm its in apache directory
 
Last edited:
Can someone post a detailed guide on getting this to work? I installed appserv and i see this:
 
Hey i tried it and it didn't work but i'm not sure if i got my ip right cause i use a router and sometimes the cmyip isn't right for people that use routers.
 
i added here config.php to easier setup so just edit config.php only
register.php
Code:
<? 
require("config.php");
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Eudemons Register</title>
<script type="text/javascript" src="./inc/md5.js"></script>
<link href="default.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
a {
	font-size: 12px;
	color: #FFFFFF;
	font-weight: bold;
}
a:visited {
	color: #FFFFFF;
}
a:hover {
	color: #FFFF00;
}
a:active {
	color: #FFFF00;
}
-->
</style></head>
<DIV align="center"><b class="h2">
 <?php
	echo "Welcome to ".$servername." Account Registration";
 ?>
</b>
<br />
<form method='post' action='register.php?act=register'>
      <TABLE width="312">
        <TBODY>
        <TR>
          <TD id=GoodStuff style="PADDING-LEFT: 0px; MARGIN-LEFT: 0px">
            <DIV id=theform style="PADDING-LEFT: 0px">
            <TABLE class=body width="323" height="229">
              <TBODY>
              <TR>
                <TD align="left" height="32">UserID:</TD>
                <TD class=it3 height="32">
				<INPUT class=it style="FONT-SIZE: 9pt" name="id" id="id">				</TR>
              <TR>
                <TD align="left" height="37">Password:</TD>
                <TD class=it3 height="37">
				<INPUT class=it id="ipassword" style="FONT-SIZE: 9pt" type=password maxLength=12 name=pass></TD>
                </TR>
              <TR>
                <TD align="left" height="32">Retype Password:</TD>
                <TD class=it3 height="32">
				<input class=it1 id="ipassword" style="FONT-SIZE: 9pt" type=password maxlength=12 name=retpass></TD>
                </TR>
              <TR>
                <TD align="left" height="32">Type Check Code:</TD>
                <TD class=it3 height="32">
					<input name='CheckCode' size='20' maxlength='6'class=it style="FONT-SIZE: 9pt"></TD>
                </TR>
              <TR>
                <TD height="25" align="left">Check Code:</TD>
                <TD height="25"><span style="font-size: 9pt"><img src='./inc/img.php' width='200' height='60' alt='Visual CAPTCHA' 
  style='border: 1px solid #000000; padding: 2px;' /></TD></TR>
              <TR>
                <TD></TD>
                <TD style="FONT-SIZE: 14px; VERTICAL-ALIGN: middle">
				<span style="font-size: 9pt"><input type="hidden" name="hash"><input class=Butt type=submit onclick="hash.value = login(pass.value)" value='Register' name=B1></span></TD>
                </TR></TBODY></TABLE>
            </DIV></TD></TR></TBODY></TABLE></FORM>
			<center>
			<?php
			if($_GET['act'] == "register")
			{
				if(PhpCaptcha::Validate($_POST['CheckCode']))
				{
					mysql_select_db($mydbacc);
					$userid = trim($_POST['id']);
					$password=trim($_POST['pass']);
					$passretype=trim($_POST['retpass']);
					$hash=$_POST['hash'];
					if(!ereg("^[0-9a-z]{4,12}$",$userid))
					{
						echo "Only letters from \"a\" to \"z\" and numbers, lenght of 4 to 12 characters";
					}
					else
					{
						if($password == $passretype)
						{
							if(!ereg("^[0-9a-zA-Z]{4,12}$",$password))
							{
								echo "Only letters or numbers, lenght of 4 to 12 characters";
							}
							else
							{
								$res = mysql_query("select * from account where name = '".$userid."' order by id desc");
								if(mysql_num_rows($res) == 0)
								{
									mysql_query("insert into account (name,Password,Reg_date) values ('".$userid."','".$hash."','".date("y-m-d H:i:s", time())."')");
									echo "Account registered successfully.";
								}
								else
								{
									echo "Account Already exists in database.";
								}
							}
						}
						else
						{
							echo "Password not equal to Retyped Password.";
						}
					}
				}
				else
				{
					echo "Check Code is Wrong";
				}
			}
			?>
			</center>
</DIV>
</body>
</html>
config.php
Code:
<?php
	require_once './inc/class.captcha.php';
	// Configurations
	$myhost="localhost";
	$mypass="test";
	$myuser="root";
	$mydbacc="account";
	$mydbdata="my";
	$serveraddress="127.0.0.1";
	$serverport=5816;
	$servername="privateEO";
	$mydb="my";

	// Dont Edit after this
	mysql_connect($myhost,$myuser,$mypass);
	mysql_select_db($mydb);
?>
and works
 
Back