472,328 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

i need to get the client's computer name using php.

Dear Sir,

i need to get the client's computer name using php.
i tried some code like as below. but i get only client public ip or server information.
so can anyone help me to get client's infiormation.

Expand|Select|Wrap|Line Numbers
  1. echo php_uname();
  2. echo php_uname(n);
  3. $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
  5. echo $hostname
Faruk Chowdhury.
Aug 1 '10 #1
5 17884
6,050 Expert 4TB
You can't.

PHP runs on a server, and, by definition, has little to do with a client visiting that server.
Aug 1 '10 #2
do you have any other solution to regarding this problem?
Aug 1 '10 #3
1,168 Expert 1GB
You see the problem is that the internet and websites are mostly controlled by the users browser. Ultimately, you can send someone any bit of code, but if their browser can't interpret and/or run it, it will not work (hence why we hate IE so much). Although I have never tried it, you will need a client side language like javascript to attempt it. However, I think that javascript would run into restrictions because the computer might not give the browser the name to give to your script (for security reasons). In which case you will need to go to something like ASP which was made my Microsoft and has a bit more features. Communication back to PHP will be another hurdle you will have to jump after you achieve that.

Have you considered that people may not want to give you their computer name?
Aug 1 '10 #4
5,058 Expert 4TB
Have you considered that people may not want to give you their computer name?
This is the most important part in a discussion like this. You are given a very limited ability to discover details about your visitors for a reason: security. If any web server could load details about their clients, such as details about their network setup, it would make it that much easier for them to mount malicious attacks, or violate their user's privacy.

If you want such details about a client, you will need to get them through a client-side application. For that you need languages like Java to be installed on the client, which gives you the ability to *request* permission to access the client file system or execute system commands. The user can still deny you access, though.
Aug 1 '10 #5
Thanx to all..
Aug 3 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Maverick | last post by:
I'm trying to get the " Computer Name " of a client accessing my web site, is there a way to do this ? not ip... tia
by: Matt | last post by:
Hi everybody, does anyone know how to retrieve the computer name using ASP? cheers...
by: TIML | last post by:
I have tried using servervariables("XXX") to request the username and computer name of the individual running code on our internal server, but what...
by: RR | last post by:
I'm developing a web app and, for the user's convenience, I'd like to display their local computer name (i.e. the name of the computer the browser...
by: Dan Nash | last post by:
Heylo I want to be able to get the computer name from my C# page. Is this possible? Basically, I'm developing a auto-bugreport feature for an...
by: z. f. | last post by:
i need to get the computer name from an aspx page. i use System.Windows.Forms.SystemInformation.ComputerName() and it's working fine, but in...
by: =?Utf-8?B?QkRSaWNoYXJkc29u?= | last post by:
I am aware that is is possible to determine the web client computer name using DNS, i.e. invoke System.Net.Dns.GetHostEntry(...
by: VinayKumarParakoti | last post by:
Hi All, I am trying to get the login name of client's machine using Perl. I was under impression that getlogin() will do the job. But this is...
by: mitja | last post by:
Hi, I have read a lot of posts on the web and got no answer. Is there any chance of geting any unique client identification data (his IP-but not...
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.