with using gethostbyaddr($_SERVER['REMOTE_ADDR']); we can only find the IP address and also if we use php_uname ( ‘n’); we find the server name.
is there any code to find exactly the name of computer of the web site’s viewer ?
in PHP or in javascript ?
hey all,
we use php_uname ( ‘n’); we find the server name.
is there any code to find exactly the name of computer of the web site’s viewer ?
in PHP or in javascript ?
im not too too smart when it comes to stuff like this but im trying to find the location of a stolen computer, any help? i dont know the name or ip address but ive been looking into it, how do i send the code to find the computer name?
I’m not sure if I’m having a problem with the installation of PHP on the server or if there’s something that I’m not doing right in the code, but I am trying to capture the IP address of anyone that is trying to log into a secure part of a site. Regardless of my IP address, when I do:
Code:
echo $_SERVER['remote_addr'];
It returns ’192.168.1.1′. This is the first time I’ve written code that is being used on a Windows Server, so I don’t know if that has anything to do with it.
I’ve run phpinfo(), and in the PHP Variables section, it shows “_SERVER["REMOTE_ADDR"]” : 192.168.1.1. Does this mean that the php.ini file is setup wrong, or am I missing something?
i am running my own server on windows 7 iis7.5 with php as fastcgi and i am behind a router with a dynamic ip not static and i am using http://www.no-ip.com/ that give me a link to my router and i am opening 80 port in my router forwarding it to my id address 192.168.1.5 and i have tested a php file that contains
tested it using tor network that give me ip out of my network to test that file always give me the same result 192.168.1.1 i am trying to get IP address of the visitor and i asked someone of my friends to use this form it sends the same ip
i hope someone tells me what i am doing wrong and the solution for this problem
After exploring a few of the articles on your web page,
I truly appreciate your way of writing a blog. I saved as a favorite it to my bookmark website list and will be checking back
soon. Please visit my website as well and tell me how you feel.
36 Responses for "How to get user’s IP and computer name using PHP"
its gr8,
if i think , it can be used as a windows authentication provided using a domain user(machine) of a network.
Hey dude, this is view only remote IP adress, but i need to client’s computer name. Do you know to any? For example use javascript and PHP :s
Try this out
echo php_uname();
echo php_uname(‘n’);
Thanx for your valuable information. It will be helpful for me
thanks its work
its great thanks
Hermano con echo
echo php_uname ( ‘n’);
obtengo es el nombre del equipo cliente no el remoto. Si tienes la solución mucho sabría agradecerle.
hey all,
with using gethostbyaddr($_SERVER['REMOTE_ADDR']); we can only find the IP address and also if we use php_uname ( ‘n’); we find the server name.
is there any code to find exactly the name of computer of the web site’s viewer ?
in PHP or in javascript ?
Thank’s a lot. It works fine….
hello,
i want to get the localhost of a site for example http://www.italy.com
is there a way to type in php? pls reply
Neither gethostbyaddr($_SERVER['REMOTE_ADDR']);
not php_uname();
is capable of giving you the client’s machine’s IP.
That is actually not possible (as fa as I think).
If you can get that info you can put virus strait-away into it.
How to get user’s workgroup name and hardware information using PHP
hey all,
we use php_uname ( ‘n’); we find the server name.
is there any code to find exactly the name of computer of the web site’s viewer ?
in PHP or in javascript ?
I think it is possible but it is hard with php cause hotmail does it
try getenv(‘COMPUTERNAME’);
im not too too smart when it comes to stuff like this but im trying to find the location of a stolen computer, any help? i dont know the name or ip address but ive been looking into it, how do i send the code to find the computer name?
dsfgdsfg dsfg sdfg
Hi…
Its really great.. This one i want.. thanks for your post.
There is no way to get client machine ID using PHP as far as i know. if you can do you will be a good hacker.
HELLO:)
i an learning the PHP and Javascript
but i an not sure whether it is just basic or advanced.
so Plz help me to find out…
thanks in advanced.
thanks man
I wrote this to log mt users. now all I have to do is figure out how to only allow US and Canada ips:
Hi every one my name is AlAa
My problem with $_SERVER['remote_addr']
I’m not sure if I’m having a problem with the installation of PHP on the server or if there’s something that I’m not doing right in the code, but I am trying to capture the IP address of anyone that is trying to log into a secure part of a site. Regardless of my IP address, when I do:
Code:
echo $_SERVER['remote_addr'];
It returns ’192.168.1.1′. This is the first time I’ve written code that is being used on a Windows Server, so I don’t know if that has anything to do with it.
I’ve run phpinfo(), and in the PHP Variables section, it shows “_SERVER["REMOTE_ADDR"]” : 192.168.1.1. Does this mean that the php.ini file is setup wrong, or am I missing something?
i am running my own server on windows 7 iis7.5 with php as fastcgi and i am behind a router with a dynamic ip not static and i am using
http://www.no-ip.com/ that give me a link to my router and i am opening 80 port in my router forwarding it to my id address 192.168.1.5 and i have tested a php file that contains
tested it using tor network that give me ip out of my network to test that file always give me the same result 192.168.1.1 i am trying to get IP address of the visitor and i asked someone of my friends to use this form it sends the same ip
i hope someone tells me what i am doing wrong and the solution for this problem
Thanks in advance
i use this function to find the ip adress of any machine successfuly
function getIP(){
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && eregi(“^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$”,$_SERVER['HTTP_X_FORWARDED_FOR'])){
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = getenv(“REMOTE_ADDR”);
}
return $ip;
}
thanks
Thanks!
thank you for this nice information
how to get visitors system mac address from php..please help me..
Gr8 it works fine. Thanks
After exploring a few of the articles on your web page,
I truly appreciate your way of writing a blog. I saved as a favorite it to my bookmark website list and will be checking back
soon. Please visit my website as well and tell me how you feel.
thanks for your adnice.
regards
ishor
here is a link that you might find helpful… it worked for me!
http://www.kmbytes.com/blog/how-to-get-clients-ip-of-the-users-that-visit-your-website/
it works fine, thanx…
Hi there to all, how is all, I think every one is getting more from this website,
and your views are good in favor of new viewers.
wow so nice scripting of penguins yaaaar i just love it
its really work, but we want to find client mac address.
so please guide me about it.
It is in point of fact a nice and helpful piece of info.
I’m satisfied that you simply shared this helpful info with us. Please stay us informed like this. Thank you for sharing.
Leave a reply