<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
if (isset($_POST['request']))
{
define("DB_HOST","mysql117.loopia.se");
define("DB_USER","normal@i103189");
define("DB_PASS","KungMicke87");
define("DB_NAME","indiehjaerta_com");
// Connect to MySQLi
$sqli = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die("Error: ".mysqli_error($sqli));
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$email = mysqli_real_escape_string($sqli, $_POST['email']);
$timestamp = date('Y-m-d H:i:s');
$token = sha1(uniqid($email, true));
$url = "http://www.indiehjaerta.com/getpassword.php?token=$token";
//$message = "Press think link $url to reset your password.\n\n If you didn't request a password change please discard this e-mail.";
$message = "This function is currently not working :(";
$headers = 'From: [indiehjaerta.com] Admin <no-reply@indiehjaerta.com>' . "\r\n";
mail($email, "[indiehjaerta.com] Password Reset", $message, $headers);
$ip = ip2long($_SERVER['REMOTE_ADDR']);
$query = mysqli_query($sqli,"INSERT INTO passwordrequest (`ipaddress`, `email`, `timestamp`, `token`) VALUES ('$ip', '$email', '$timestamp', '$token')");
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>indiehjaerta.com - Request Password</title>
<link href="style_test.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a href="login.php">Login<a/> -
<a href="admin.php">Admin<a/> -
<a href="members.php">Members<a/> -
<a href="register.php">Register<a/> -
<a href="blog.php">Blog<a/> -
<a href="news.php">News<a/> -
<a href="event.php">Event<a/> -
<a href="forum.php">Forum<a/>
<br /> <br />
<?php
if (isset($_POST['request']))
{
?>
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>E-mail sent to <?php echo $email ?> with details on how to change password.</strong></td>
</tr>
</table>
</td>
</tr>
</table>
<?php
}
else
{
?>
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form method="post" action="">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Password request.</strong></td>
</tr>
<tr>
<td width="78"><strong>E-mail</strong></td>
<td width="6">:</td>
<td width="294"><input name="email" type="text" id="email"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="request" value="Request"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<?php
}
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo '<span class="text">Page generated in '.$total_time.' seconds.</span><br />';
?>
</body>
</html>
- Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.2, 5.1.4, 5.1.6, 5.2.0 - 5.2.17, 5.4.37, 5.5.8, 5.5.14, 5.5.16, 5.5.19, 5.5.21, 5.5.25, 5.5.28 - 5.5.29, 5.5.31, 5.5.33 - 5.5.34, 5.5.36 - 5.5.37, 5.6.2 - 5.6.4, 5.6.6, 5.6.11 - 5.6.13, 5.6.15, 5.6.17, 5.6.24 - 5.6.25, 5.6.28 - 5.6.31, 5.6.36, 5.6.38 - 5.6.40, 7.0.0 - 7.0.3, 7.0.5 - 7.0.8, 7.0.10 - 7.0.18, 7.0.20 - 7.0.33, 7.1.0 - 7.1.10, 7.1.12 - 7.1.33, 7.2.0 - 7.2.3, 7.2.5 - 7.2.7, 7.2.9, 7.2.11, 7.2.13 - 7.2.14, 7.2.19, 7.2.21 - 7.2.24, 7.3.0 - 7.3.3, 7.3.5 - 7.3.7, 7.3.9 - 7.3.12, 7.4.0 - 7.4.1
- <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>indiehjaerta.com - Request Password</title>
<link href="style_test.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a href="login.php">Login<a/> -
<a href="admin.php">Admin<a/> -
<a href="members.php">Members<a/> -
<a href="register.php">Register<a/> -
<a href="blog.php">Blog<a/> -
<a href="news.php">News<a/> -
<a href="event.php">Event<a/> -
<a href="forum.php">Forum<a/>
<br /> <br />
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form method="post" action="">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Password request.</strong></td>
</tr>
<tr>
<td width="78"><strong>E-mail</strong></td>
<td width="6">:</td>
<td width="294"><input name="email" type="text" id="email"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="request" value="Request"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<span class="text">Page generated in 0 seconds.</span><br />
</body>
</html>
- Output for 5.1.3, 5.1.5, 5.4.0 - 5.4.36, 5.4.38 - 5.4.45, 5.5.0 - 5.5.7, 5.5.9 - 5.5.13, 5.5.15, 5.5.17 - 5.5.18, 5.5.20, 5.5.22 - 5.5.24, 5.5.26 - 5.5.27, 5.5.30, 5.5.32, 5.5.35, 5.5.38, 5.6.0 - 5.6.1, 5.6.5, 5.6.7 - 5.6.10, 5.6.14, 5.6.16, 5.6.18 - 5.6.23, 5.6.26 - 5.6.27, 5.6.32 - 5.6.35, 5.6.37, 7.0.4, 7.0.9, 7.0.19, 7.1.11, 7.2.4, 7.2.8, 7.2.10, 7.2.12, 7.2.15 - 7.2.18, 7.2.20, 7.2.25 - 7.2.26, 7.3.4, 7.3.8, 7.3.13
- <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>indiehjaerta.com - Request Password</title>
<link href="style_test.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a href="login.php">Login<a/> -
<a href="admin.php">Admin<a/> -
<a href="members.php">Members<a/> -
<a href="register.php">Register<a/> -
<a href="blog.php">Blog<a/> -
<a href="news.php">News<a/> -
<a href="event.php">Event<a/> -
<a href="forum.php">Forum<a/>
<br /> <br />
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form method="post" action="">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Password request.</strong></td>
</tr>
<tr>
<td width="78"><strong>E-mail</strong></td>
<td width="6">:</td>
<td width="294"><input name="email" type="text" id="email"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="request" value="Request"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<span class="text">Page generated in 0.0001 seconds.</span><br />
</body>
</html>
- Output for 5.3.0, 5.3.2 - 5.3.13, 5.3.16 - 5.3.20, 5.3.22 - 5.3.27, 5.3.29
- <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>indiehjaerta.com - Request Password</title>
<link href="style_test.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a href="login.php">Login<a/> -
<a href="admin.php">Admin<a/> -
<a href="members.php">Members<a/> -
<a href="register.php">Register<a/> -
<a href="blog.php">Blog<a/> -
<a href="news.php">News<a/> -
<a href="event.php">Event<a/> -
<a href="forum.php">Forum<a/>
<br /> <br />
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form method="post" action="">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Password request.</strong></td>
</tr>
<tr>
<td width="78"><strong>E-mail</strong></td>
<td width="6">:</td>
<td width="294"><input name="email" type="text" id="email"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="request" value="Request"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<span class="text">Page generated in -0 seconds.</span><br />
</body>
</html>
- Output for 5.3.1, 5.3.14 - 5.3.15, 5.3.21, 5.3.28
- <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>indiehjaerta.com - Request Password</title>
<link href="style_test.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a href="login.php">Login<a/> -
<a href="admin.php">Admin<a/> -
<a href="members.php">Members<a/> -
<a href="register.php">Register<a/> -
<a href="blog.php">Blog<a/> -
<a href="news.php">News<a/> -
<a href="event.php">Event<a/> -
<a href="forum.php">Forum<a/>
<br /> <br />
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form method="post" action="">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Password request.</strong></td>
</tr>
<tr>
<td width="78"><strong>E-mail</strong></td>
<td width="6">:</td>
<td width="294"><input name="email" type="text" id="email"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="request" value="Request"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<span class="text">Page generated in -0.0001 seconds.</span><br />
</body>
</html>
preferences:
254.82 ms | 404 KiB | 325 Q