473,383 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 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 18338
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 I want and can't seem to capture is the user's...
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 is running on). I've looked very hard to find a...
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 intranet and want to know which machine sent the...
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 second thought, it might not be recomended to use the...
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( System.Web.HttpRequest.UserHostAddress). However, this only seems to...
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 not giving correct results. Could anypne...
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 proxy IP or router or NAT, his username, his...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.