Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identifying apache uniquely? 1

Status
Not open for further replies.

notuserfriendly

Programmer
May 7, 2004
82
0
0
SE
Hi

I'm wondering if there's a nice way of uniquely identifying
an apache server or php installation. I want to use my code on different servers and need to find a way to know
which server the code is running on.

I
 
Suggestions:
1. Server IP
2. $_SERVER['HTTP_HOST']

 
Thanks for the reply but
I'm aware of how to get the IP, I'm more searching
for a fingerprint that uniquely identifies the server, since IP:s can change. In the phpinfo() there is nothing
uniquely identifying the server.


 
If they have a SSL certificate you could probe the SSL port. These certificates surely are unique.
 
`hostname` would return the computer's hostname.
 
I think I have to try the SSL certificate then, was
thinking on the ssh2 certificate, but just wanted to
know if there was another way.

Thanks, and I probably should mark the thread solved or something
 
when the script is first run, create a random number using something like microtime() or rand() and store it in a file. this number will be unique in almost all cases (like 99.999%)

that way you can uniquely identify the server
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top