Hi !

I have a question on how to get the current nick name from whois viewing whatever profile page and where the nick name is stored inside NICK_NAME

so far this works with date, dns, ip but it would be nice if it's possible to get the nick name of whoever is viewing my page if they are logged on of course.

how can you read from let's say: NICK_NAME where the username from the person that is viewing the page is stored and print the result via email?

Thnx to anyone who can help me with this :-)

Marnix

---perl script---

PHP Code:

#!/usr/bin/perl

$sendmail_path='/usr/sbin/sendmail';
$to_address='email@provider.com';

if (
length($ENV{HTTP_X_FORWARDED_FOR})>1) { $xf=$ENV{HTTP_X_FORWARDED_FOR}; }
else { 
$xf='NULL'; }
$ra=$ENV{REMOTE_ADDR}; @numbs=split(/\./, $ra);
$address=pack("C4", @numbs); $gothostbyaddr=gethostbyaddr($address2);
$gt=gmtime$head=$ENV{REMOTE_ADDR};
@
tl=(85,78,73,46,68,69); ($gothostbyaddr) && ($head=$gothostbyaddr);

if (
length($ENV{QUERY_STRING})>1) { $reff=$ENV{QUERY_STRING}; } else
{
$reff=$ENV{HTTP_REFERER};
$reff=~s/%([a-fA-F0-9][a-fA-F0-9])/pack("C"hex($1))/eg;
$head.=$reff"
$from_address="".$to_address;

open(MH,"|$sendmail_path -t");
print 
MH "To: $to_address\nFrom: $from_address";
print 
MH "\n";
print 
MH "Subject: Visitor Stats: $head\n\nHTTP_REFERER  $reff";

print 
MH "\n";

print 
MH "DNS           $gothostbyaddr\nIP            $ENV{REMOTE_ADDR}";

print 
MH "\n";

print 
MH "BROWSER       $ENV{HTTP_USER_AGENT}\nDate          $gt GMT (+ 1 uur)";

print 
MH "\n";

print 
MH "FORWARDED_FOR $xf";

print 
MH "\n";

print 
MH "APPS          $ENV{HTTP_ACCEPT}\n\n";

print 
MH "mydomain.com";

print 
"\n";

close MH;

print 
"Content-type: image/x-xbitmap\n\n";
print 
"#define name_width 1";
print 
"\n";
print 
"#define name_height 1";

print 
"\n";

print 
"static char name_bits[] = { 0x04 };";
print 
"\n"