Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
$_SERVER[''SERVER_ADMIN'] & The users email address
Old 02-19-2008, 06:39 PM $_SERVER[''SERVER_ADMIN'] & The users email address
Extreme Talker

Posts: 172
Name: James
Location: Australia
Trades: 0
I need help, about what is going on with some PHP superglobals, and if someone can inform me as to what I am missing in the below statement.

I have a website which requires people to log in, and as a security feature, I collect the users IP address with $_SERVER['REMOTE_ADDR'] and I had felt that I had just found out that I could get the machine name also, or what that machine has set as their email address.

$_SERVER['SERVER_ADMIN'] is the one which always got my own email address during tests, and so I have started to use it.

It returns my hotmail email address, of which has no relation whatsoever to my website, which is hosted by an independent web hoster.

I have just looked at the database of three new members, and it contains my hotmail address for each of these members.


What is going on?
TRANZIT JIM is offline
Reply With Quote
View Public Profile Visit TRANZIT JIM's homepage!
 
 
Register now for full access!
Old 02-19-2008, 07:38 PM Re: $_SERVER[''SERVER_ADMIN'] & The users email address
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
That variable is the value defined in the Apache virtual host definition as the contact person of the web site. Nothing to do with your users.
Quote:
'SERVER_ADMIN' The value given to the SERVER_ADMIN (for Apache) directive in the web server configuration file. If the script is running on a virtual host, this will be the value defined for that virtual host.
There is a reference on those variables there:
http://www.php.net/manual/en/reserved.variables.php

The computer name is not available. On a small extent, the reverse DNS name can be found, by doing a reverse DNS query, but you'll end with the DNS name for the ip adress of the user, not the computer name.
For example, my computer name is "devLinux", and my reverse DNS name right now is "84-73-38-182.dclient.hispeed.ch."
It's usually combined by the reversed IP adress (it's a reverse DNS query after all) and the ISP domain name.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 02-20-2008, 01:39 AM Re: $_SERVER[''SERVER_ADMIN'] & The users email address
Extreme Talker

Posts: 172
Name: James
Location: Australia
Trades: 0
How would one get the 'reverse DNS' of a user in a PHP script?
TRANZIT JIM is offline
Reply With Quote
View Public Profile Visit TRANZIT JIM's homepage!
 
Old 02-20-2008, 02:04 AM Re: $_SERVER[''SERVER_ADMIN'] & The users email address
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
php.net/manual/en/function.dns-get-record.php
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 02-20-2008, 03:38 AM Re: $_SERVER[''SERVER_ADMIN'] & The users email address
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Quote:
Originally Posted by mtishetsky View Post
php.net/manual/en/function.dns-get-record.php
I would have rather said gethostbyaddr(), but dns_get_Record() let you do the job too.

http://www.php.net/manual/en/function.gethostbyaddr.php
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to $_SERVER[''SERVER_ADMIN'] & The users email address
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16171 seconds with 12 queries