FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Old version trouble with $_SERVER variables?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Old version trouble with $_SERVER variables? [message #179825] Mon, 10 December 2012 19:05 Go to previous message
C is currently offline  C
Messages: 24
Registered: January 2012
Karma:
Junior Member
What is causing the $host, $realhost and $referer variables to be
blank?

<?php

global $host;

$date = date("F jS Y, h:iA");

$host=@gethostbyaddr($_SERVER['REMOTE_ADDR']);

if ($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"] != "")
{$realhost =
@gethostbyaddr($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]);}

$referer = $_SERVER['$HTTP_REFERER'];

mail("my.address@whatever", "visitor information", "$host at $date
from
$referer.
Forwarded for $realhost");


?>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Simple expression parser for PHP.
Next Topic: test,ignore
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 12:24:43 GMT 2024

Total time taken to generate the page: 0.04577 seconds