ArtLung Blog

Joe Crawford, Moorpark, California, USA. Making web pages since 1996.

Dead PHP3 Code

People don't write PHP like this anymore, or, if they do, they get hurt badly. This is old code of mine. Timestamp is January 29, 2002. Yeesh.

<?
$where_they_are = 'http://' . $SERVER_NAME . $REQUEST_URI;
if ($HTTP_REFERER!='')
{ $recipientlist='joe@artlung.com';
$emailsubject="visit to $SERVER_NAME via " . $HTTP_REFERER;
$emailbody="someone came to $where_they_are
via $HTTP_REFERER
ip address: $REMOTE_ADDR
remote host: $REMOTE_HOST
user agent: $HTTP_USER_AGENT
cool.";
$firstname='ArtLung.com';
$lastname='Notification Email';
$email='bot@artlung.com';
mail(
$recipientlist, $emailsubject, $emailbody,
"From: $firstname $lastname <$email>\nReply-To: $email\nX-Mailer: PHP/" .
phpversion());
} else { echo '<!--mailreferer.php3-->'; };
?>

One Response to “Dead PHP3 Code”

  1. INeedCoffee Do Overs - MAS o Menos Says:

    [...] posted code he wrote back in 2002 that he would never write today. The great thing about the web is it is a living document. Change [...]

Leave a Reply

© 2001-2009 Joe Crawford.