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']);
  4.  
  5. echo $hostname
  6.  
Regards,
Faruk Chowdhury.
Aug 1 '10 #1
5 17884
Markus
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
TheServant
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
Atli
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

5
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
4
by: Matt | last post by:
Hi everybody, does anyone know how to retrieve the computer name using ASP? cheers...
2
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...
3
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...
9
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...
5
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...
8
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(...
2
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...
2
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...
0
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....
0
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...
0
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...
0
better678
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...
0
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...
0
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...
0
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...
0
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...
1
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.