-
Scripts
Scripts by me.
Verification
<?php
session_start();
header ("Content-type: image/png");
$rno = rand(1000,99999);
$_SESSION['ckey'] = md5($rno);
$img_handle = imageCreateFromPNG("bg1.PNG");
$color = ImageColorAllocate ($img_handle, 0, 0, 0);
ImageString ($img_handle, 5, 20, 13, $rno, $color);
ImagePng ($img_handle);
ImageDestroy ($img_handle);
?>
pngimg.php is above.
in register.php add
if (strcmp(md5($_POST['user_code']),$_SESSION['ckey'])){
die("Invalid code entered. Please enter the correct code as shown in the Image");
}
Login Script
<?php
include 'config.php';
$user_email = mysql_real_escape_string($_POST['email']);
if ($_POST['Submit']=='Login')
{
$pass = ($_POST['pwd']);
$sql = "SELECT id,user_email FROM users WHERE
user_email = '$user_email' AND
user_pwd = '$pass' AND user_activated='1'";
$result = mysql_query($sql) or die (mysql_error());
$num = mysql_num_rows($result);
if ( $num != 0 ) {
// A matching row was found - the user is authenticated.
session_start();
list($user_id,$user_email) = mysql_fetch_row($result);
// this sets variables in the session
$_SESSION['user']= $user_email;
if (isset($_GET['ret']) && !empty($_GET['ret']))
{
header("Location: $_GET[ret]");
} else
{
header("Location: myaccount.php");
}
//echo "Logged in...";
exit();
}
header("Location: login.php?msg=Invalid Login");
//echo "Error:";
exit();
}
?>
cPanel
<?php
session_start();
if (!isset($_SESSION['user']))
{
die ("Access Denied");
}
?>
<h2>My Account </h2>
<?php if (isset($_SESSION['user'])) { ?>
<p>Logged as <?php echo $_SESSION['user']; ?> | <a href="settings.php">Settings</a>
| <a href="logout.php">Logout</a> </p>
<?php } ?>
Didn't find what you need? Request one here.
-
Re: [release]Scripts
can u give me an "online" script?
-
Re: [release]Scripts
-
Re: [release]Scripts
It would probably help the community so much better if you would tell us what these are for specifically. Are they simply PHP Scripts for a CMS Site? Or do these go in the sources?
-
Re: [release]Scripts
if those are sources they suck, because obviously you need to gives your config.php and the settings.php delcared in the cpanel.
-
Re: [release]Scripts
Yet again another SQL Injection-Able. script - Please if your going to release it make it secure.
-
Re: [release]Scripts
I'll add more security, infact ill make a CMS to prove my "proness.php"
-
Re: [release]Scripts
do you have a online script?
-
Re: [release]Scripts
3/4 of everyone don't even know how to sql inject and out of those 3/4 some don't even know what it is.