473,383 Members | 1,785 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.

How to grap computername

Ryd
I'm looking for at asp script that grap the clients computername when
they access a local http site. The client and server is in a local
domaine.
Jul 19 '05 #1
2 1441
You'd have to use the server to resolve the name of the IP address of the
client machine. Here's a flakey method that may work most of the time.

<%
Dim sIP
Dim oShell, oExec, sCommand, sOutput
sIP = Request.ServerVariables("REMOTE_ADDR")
sCommand = "%comspec% /c @echo off & for /f ""tokens=2"" %q in ('ping -n
1 -a " & sIP & "^|find /i ""pinging""') do echo %q"
Set oShell = Server.CreateObject("WScript.Shell")
Set oExec = oShell.Exec(sCommand)
sOutput = sOutput & oExec.StdOut.ReadAll
Set oExec = Nothing
Set oShell = NOthing
Response.WRite sOutput
%>

Ray at work

"Ryd" <ry******@hotmail.com> wrote in message
news:68*************************@posting.google.co m...
I'm looking for at asp script that grap the clients computername when
they access a local http site. The client and server is in a local
domaine.

Jul 19 '05 #2
Hallo Ray
Thank you vary much.

It just works fine.
Ryd
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: vishal | last post by:
i have created one page in asp login.php on my pc it is working as http://localhost/index.php but when i access this page from other computer in network it is not working pls help me ...
2
by: dthmtlgod | last post by:
I am attempting to retrieve the computer name of a remote user accessing our websever. I have tried the following and both don't work. Any ideas? Returns the webserver computer name Set...
7
by: Mindy Geac | last post by:
Hello, i'm new with ASP! How can I display the hosting computername on the website, We have 2 servers and I want to know which server I'm getting the asp pages from. thnx, Mindy
2
by: Todd | last post by:
Is there a method I can use in C# that will set the ComputerName? Any Help would be appreciated. Thanks Todd
1
by: Jason Shohet | last post by:
i'm using C#, would like to get the computerName of the machine on a windows2000 network. TY Jason Shohet
2
by: Joseph | last post by:
Has anyone had any experience gathering the local computername through a web application with no client side program. I've been researching different avenues and have been coming up blank so far. ...
0
by: amjad | last post by:
Dear All, I am using Visual Studio beta 2005 beta 2 with ASP.Net 2.0 and C#.I run the application and it work correctly with http://localhost:port/projectname/page but not with...
1
by: luca72 | last post by:
Hello at all. I need to do a real time plot where on the frame i have this like limit line: import math dati = for freq in range(int(freqiniziale), (int(freqfinale )+ 1)): forza = float(massa)...
1
by: usman211 | last post by:
i m using the following code for IP and ComputerName, it run accurately with our LAN but when i run it from some remote/hosting servers(like godaddy where the site is hosted) it get the IP of my...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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.