projects
/
clearscm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
42bd9d8
)
Added code to not send me email when I go to my own resume
author
Andrew DeFaria
<Andrew@DeFaria.com>
Fri, 1 Mar 2019 18:12:31 +0000
(11:12 -0700)
committer
Andrew DeFaria
<Andrew@DeFaria.com>
Fri, 1 Mar 2019 18:12:31 +0000
(11:12 -0700)
web/Resumes/Andrew/index.php
patch
|
blob
|
history
diff --git
a/web/Resumes/Andrew/index.php
b/web/Resumes/Andrew/index.php
index
eb90840
..
a7a970d
100644
(file)
--- a/
web/Resumes/Andrew/index.php
+++ b/
web/Resumes/Andrew/index.php
@@
-72,27
+72,38
@@
function stoptimer () {
$msg .= '<h1>Somebody just visited your resume.</h1>';
$msg .= "<p>Here's what I know about them:</p>";
$msg .= '<h1>Somebody just visited your resume.</h1>';
$msg .= "<p>Here's what I know about them:</p>";
+ $me = false;
+
foreach ($_SERVER as $key => $value) {
foreach ($_SERVER as $key => $value) {
- if (preg_match("/^REMOTE/", $key)) {
- $msg .= "$key: $value<br>";
+ if (preg_match("/^REMOTE/", $key)) {
+ $msg .= "$key: $value<br>";
+
+ if ($key == 'REMOTE_ADDR') {
+ // Skip me...
+ if ($value == '184.182.63.133') {
+ $me = true;
- if ($key == 'REMOTE_ADDR') {
- exec("whois $value", $output, $result);
+ break;
+ } // if
- foreach ($output as $line) {
- $msg .= "$line<br>";
- } // foreach
+ exec("whois $value", $output, $result);
+
+ foreach ($output as $line) {
+ $msg .= "$line<br>";
+ } // foreach
+ } // if
} // if
} // if
- } // if
} // foreach
} // foreach
- $msg .= '</body></html>';
- $headers = "MIME-Version: 1.0\r\n";
- $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
- $headers .= "From: Andrew DeFaria <Andrew@DeFaria.com>";
+ if (!$me) {
+ $msg .= '</body></html>';
+ $headers = "MIME-Version: 1.0\r\n";
+ $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
+ $headers .= "From: Andrew DeFaria <Andrew@DeFaria.com>";
- mail("andrew@defaria.com", "Somebody visited your resume", $msg, $headers);
- ?>
+ mail("andrew@defaria.com", "Somebody visited your resume", $msg, $headers);
+ } // if
+?>
</head>
<body onload="blink()" onunload="stoptimer()" id="homepage">
</head>
<body onload="blink()" onunload="stoptimer()" id="homepage">