<?php
$online = @fsockopen("112.205.30.106", 28000, $errno, $errstr, 1);
if($online >= 1) {
echo '<b><font color=#00FF00>Online</font></b>';
}
else {
echo '<b><font color=#FF0000>Offline</font></b>';
}
?></li>
<br><li>Login Server:
<?php
$online = @fsockopen("127.0.0.1", 23000, $errno, $errstr, 1);
if($online >= 1) {
echo '<b><font color=#00FF00>Online</font></b>';
}
else {
echo '<b><font color=#FF0000>Offline</font></b>';
}
?></li>
<br><li>World Server:
<?php
$online = @fsockopen("127.0.0.1", 15400, $errno, $errstr, 1);
if($online >= 1) {
echo '<b><font color=#00FF00>Online</font></b>';
}
else {
echo '<b><font color=#FF0000>Offline</font></b>';
}
?></li>
</ul>
</li>
</ul>
</div>
<!-- start content -->
<div id="content">
<div class="post">
<div class="entry">
<p><?php
require('./configs/reg_conf.php');
function doesUsernameExist($name){
$exit = FALSE;
$result = @mssql_query("SELECT * FROM ACCOUNT_TBL WHERE account='$name'");
if (mssql_num_rows($result) != 0){
$exit = TRUE;
}
return $exit;
}
if(isset($_POST['submit'])){
$user = preg_replace ("[^A-Za-z0-9]", "", $_POST['username']);
$pass = preg_replace ("[^A-Za-z0-9]", "", $_POST['password']);
if($_POST['username'] == ""){
echo '<font color="red">Enter a user.</font><br /><br />';
}
else if($_POST['password'] == ""){
echo '<font color="red">Enter a password.</font><br /><br />';
}
else if ((strlen($_POST['username']) > 16) || (strlen($_POST['username']) < 3)){
echo '<font color="red">The user should be 3 to 16 characters.</font><br /><br />';
}
else if ((strlen($_POST['password']) > 16) || (strlen($_POST['password']) < 3)){
echo '<font color="red">The password should be 3 to 16 characters.</font><br /><br />';
}
else if($_POST['username'] != $user){
echo '<font color="red">User with invalid characters.</font><br /><br />';
}
else if($_POST['password'] != $pass){
echo '<font color="red">Password with invalid characters.</font><br /><br />';
}
else {
$pass = md5('serus' . $pass);
if(!doesUsernameExist($user)){
$stmt = mssql_init('[B]createaccount[/B]', $link);
mssql_bind($stmt, '@account', $user, SQLVARCHAR, false, false, 15);
mssql_bind($stmt, '@password', $pass, SQLVARCHAR, false, false, 36);
mssql_execute($stmt) or die ("Something is wrong on the execution");
mssql_free_statement($stmt);
echo '<font color="blue">Register Successfull.</font><br /><br />';
}
else {
echo '<font color="red">User already Exist.</font><br /><br />';
}
}
mssql_close();
}
echo '<form action="register.php" method="post">';
echo 'Username: <input type="text" name="username" /><br />';
echo 'Password: <input type="password" name="password" /><br />';
echo '<input type="submit" name="submit" value="Register" />';
echo '</form>';
?>
when i'm using the query of webCreateAcc instead of the createaccount abouve.. i get error invalid function.. the query of my SQL has 3 inputs user pass email. but this script only has two inputs.. Is that the problem?