-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
132 lines (125 loc) · 3.69 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<meta name="author" content="Tuber Boy">
<title>Email Checker</title>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: linear-gradient(to bottom, #3498db, #1abc9c);
}
.container {
text-align: center;
background-color: rgba(255, 255, 255, 0.8);
padding: 20px;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
width: 500px;
margin-left: 10px;
}
.blur {
filter: blur(5px);
pointer-events: none;
transition: filter 0.3s ease-in-out;
}
h1 {
margin-bottom: 20px;
color: #333;
}
.email-input {
width: 80%;
padding: 10px;
border: none;
border-radius: 5px;
margin-bottom: 10px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
}
.submit-btn {
background-color: #16a085;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease-in-out;
}
.submit-btn:hover {
background-color: #1abc9c;
}
</style>
</head>
<body>
<?php
set_time_limit(0);
/**
* Email Checker: Created or Exists Or Active
* Author: Tuber Boy (Masud Rana)
* Date-Time: 7:12 PM Tuesday, August 27, 2024 (GMT+6)
**/
function checkEmailCreated($email) {
list($user, $domain) = explode('@', $email);
if (!checkdnsrr($domain, 'MX')) {
return false;
}
$mxHosts = [];
getmxrr($domain, $mxHosts);
foreach ($mxHosts as $mxHost) {
$timeout = 15;
$smtpConnection = fsockopen($mxHost, 25, $errno, $errstr, $timeout);
if ($smtpConnection) {
$response = fgets($smtpConnection);
if (strpos($response, '220') === 0) {
fputs($smtpConnection, "HELO " . gethostname() . "\r\n");
$response = fgets($smtpConnection);
fputs($smtpConnection, "MAIL FROM: <[email protected]>\r\n");
$response = fgets($smtpConnection);
fputs($smtpConnection, "RCPT TO: <$email>\r\n");
$response = fgets($smtpConnection);
if (strpos($response, '250') === 0) {
fclose($smtpConnection);
return true;
} elseif (strpos($response, '550') !== false) {
if (strpos($response, '5.7.1') !== false || strpos($response, 'Service unavailable') !== false) {
fclose($smtpConnection);
return true;
}
}
}
fclose($smtpConnection);
} else {
return false;
}
}
return false;
}
if (isset($_POST['email'])) {
$email = $_POST['email'];
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
if (checkEmailCreated($email)) {
echo '<div class="container"><h1><font color="blue">The email address `'.$email.'` is available!</font></h1></div>';
} else {
echo '<div class="container"><h1><font color="red">The email address `'.$email.'` is not created!</font></h1></div>';
}
} else {
echo '<div class="container"><h1><font color="warning">The email address `'.$email.'` is not valid!</font></h1></div>';
}
}
?>
<div class="container">
<h1>Email Checker</h1>
<form method="POST">
<input type="email" name="email" class="email-input" placeholder="Enter your email *" required>
<button type="submit" class="submit-btn">CHECK</button>
</form>
</div>
</body>
</html>