Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Get remote name?

Reply
Thread Tools

Get remote name?

 
 
Lasse Edsvik
Guest
Posts: n/a
 
      06-29-2004
Hello

I was wondering if it's possible to get "the name" istead of ip from a user
that runs a asp page?

cust10354-344.someisp.com istead of 231.13.434.23

/Lasse


 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      06-29-2004
If your server is able to resolve the name, here's a fairly clumsy method.

<%
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



"Lasse Edsvik" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello
>
> I was wondering if it's possible to get "the name" istead of ip from a

user
> that runs a asp page?
>
> cust10354-344.someisp.com istead of 231.13.434.23
>
> /Lasse
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
re: remote assistance and remote desktop eddy Computer Support 1 09-20-2005 03:44 AM
Ghost Console version 8 Remote Client install will not install to remote pc Ed Computer Support 3 03-18-2005 05:18 PM
Remote Assistance fails to connect, remote remote host name could not be resolved Peter Sale Wireless Networking 1 12-11-2004 09:09 PM
Difference between Remote Desktop and Remote Desktop for Admin Dave Marden MCSE 16 01-24-2004 12:47 PM



Advertisments