Register for your free account! | Forgot your password?

You last visited: Today at 05:08

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement
Bitcoin Dice Game


PHP check script

Discussion on PHP check script within the Dekaron Private Server forum part of the Dekaron category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2009
Posts: 912
Received Thanks: 250
PHP check script

I think its wrong selection , but oke.

Where can i set limit to the user names
So ppl cant add "$, ^, %, etc"??

Code:
*/

//settings

$sleep = 1; //idle status for script if password is wrong?

//settings end

$ws_pwd=md5($_POST['pwd']);
include("_mysql.php");
include("_settings.php");

$ws_user = $_POST['ws_user'];

$check = safe_query("SELECT * FROM ".PREFIX."user WHERE username='$ws_user'");
$anz = mysql_num_rows($check);

if($anz) {

	$check = safe_query("SELECT * FROM ".PREFIX."user WHERE username='$ws_user' AND activated='1'");
	if(mysql_num_rows($check)) {

    $ds=mysql_fetch_array($check);
	
		// check password
		$login = 0;
		if($ws_pwd == $ds[password]) {

    	//session
    	session_name('ws_session');
    	session_start();
    	$_SESSION['ws_auth'] = $ds['userID'].":".$ws_pwd;
    	$_SESSION['ws_lastlogin'] = $ds[lastlogin];
    	$_SESSION['referer'] = $_SERVER['HTTP_REFERER'];
    	//cookie
			setcookie("ws_auth", $ds['userID'].":".$ws_pwd, time()+($sessionduration*60*60));
			$login = 1;
		}
		elseif(!($ws_pwd == $ds[password])) {
      if($sleep) sleep(5);
	   	 $error='You have entered an invalid password.<br><br><a href="javascript:history.back()">Go back and try it again!</a>';
		}
	}
	else $error='Your account is not activated.<br><br>
					  <a href="javascript:history.back()">Go back and try it again!</a>';

}
else $error='No user with username <b>'.htmlspecialchars($ws_user).'</b> available.<br><br>
					  <a href="javascript:history.back()">Go back and try it again!</a>';

?>
<html>
<head>
<title><? echo PAGETITLE; ?></title>
<link href="_stylesheet.css" rel="stylesheet" type="text/css">
<?php if($login) { echo '<meta http-equiv="refresh" content="1;URL=index.php?site=loginoverview">';$error = 'Login successful!'; } ?>
</head>
<body bgcolor="<?php echo PAGEBG; ?>">
<table width="100%" height="100%">
  <tr>
    <td align="center">
	  <table width="350" border="1" cellpadding="10" cellspacing="0" bordercolor="<?php echo BORDER; ?>" bgcolor="<?php echo BG_1; ?>">
	    <tr>
		  <td align="center"><? echo $error; ?></td>
		</tr>
	  </table>
    </td>
  </tr>
</table>
</body>
</html>



҉ THT ҉ is offline  
Old 11/26/2009, 12:16   #2
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,853
Received Thanks: 1,873
PHP Code:
    if(!preg_match("/^[0-9a-zA-Z]{3,15}$/i"$_POST[username])) $errors[]="You are only alowed to use uppper and lower cases in English in your username."
PHP Code:
    if(strlen($_POST[username])<3$errors[] = "The length of your username can't be less than 3 characters";
    if(
strlen($_POST[username])>15$errors[]= "The length of your username can't be more than 15 characters"
PHP Code:
    if(sizeof($errors)>0){
       
$errorStr .= "<br><font>";
       
$errorStr .= "You have the following error(s):";
       foreach(
$errors as $error)
               
$errorStr .= "<li>$error</li>";
       
$errorStr .= "</font><br><br>";
    } 


janvier123 is offline  
Thanks
1 User
Old 11/26/2009, 13:55   #3
 
elite*gold: 0
Join Date: Jul 2009
Posts: 912
Received Thanks: 250
Am gonna try it soon
҉ THT ҉ is offline  
Old 11/26/2009, 14:45   #4
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,853
Received Thanks: 1,873
what are you trying to create anyway ?
register page with odbc **** ?


janvier123 is offline  
Old 11/26/2009, 17:32   #5
 
elite*gold: 0
Join Date: Jul 2009
Posts: 912
Received Thanks: 250
No its for me friend XD
he got a website ,, but you can make names like $user_&^#4eblalbla

------------------------
And it work +can close
҉ THT ҉ is offline  
Old 11/26/2009, 17:54   #6
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,853
Received Thanks: 1,873
use

PHP Code:
[0-9a-zA-Z


janvier123 is offline  
Reply



« [How To]Equip more than 1 Dark Eye | Siege Ritual »

Similar Threads Similar Threads
I want check on This Script
05/10/2010 - Kal Online - 0 Replies
I Made This Script and i want know if anyone can Penetrates db from this script or no i mean i want know this script protected or no Name Script : Find Password With ID and SN This the Site : http://196.205.224.124 ID : asdsa SN : sa And Password Will Be : Solve
็How to script check monster hit skill Real Target
11/04/2009 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 0 Replies
I'm arbalester, mostly use Real Target first then fight, have anyway for script check status monster got skill on it? plz help me Thanks
script for attendance check
07/22/2009 - Kal Online - 11 Replies
I am not looking for one, just someone to point me in the right direction I want to make a script which would automatically do the attendance check for multiple accounts in what language should I attempt? python? willing to learn here :mofo:
[WTT]No CRC check and gg bypass for dekaron eu and no crc check for 2moons
10/18/2008 - Dekaron Trading - 1 Replies
Look at the title:rolleyes: I wanna trade it for 50mill on dekaron eu. just add me to msn for proofs [email protected]



All times are GMT +2. The time now is 05:08.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

BTC: 33E6kMtxYa7dApCFzrS3Jb7U3NrVvo8nsK
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2020 elitepvpers All Rights Reserved.