ASP obtains the client, and how does asp obtain the name of the client s computer?

Updated on technology 2024-02-09
9 answers
  1. Anonymous users2024-02-05

    If you're using aspnet, he has a special function in. NET to get a computer name, IP address and current username is very simple, the following are a few methods I commonly use, if you have other good methods, you can reply and sort it out together:

    1.In private properties:

    Get the server computer name:

    Get user information:

    Get the client computer name:

    Get the client computer IP:

    Your remote host just returns the hostname, which usually refers to the domain name, and sometimes returns the IP because it failed to be verified

  2. Anonymous users2024-02-04

    You can get it by getting the environment variables.

  3. Anonymous users2024-02-03

    <%if vip = "" then vip = "remote_addr")

    str=right(vip,len(vip)-instrrev(vip,"."))

    "Your IP is: <%=VIP%>" You are a user of "<%=str%>"!

    Or: <%.

    if vip = "" then vip = "remote_addr")

    arr=split(vip,".")

    "Your IP is: <%=VIP%> "You are a <%=arr(3)%> user!

  4. Anonymous users2024-02-02

    I'll give you a function.

    Obtain the user's real IP, which is still valid for ** address;

    function getusertrueip()

    dim stripaddr

    if "http_x_forwarded_for") or instr("http_x_forwarded_for"),unknown") 0 then

    stripaddr = "remote_addr")

    elseif instr("http_x_forwarded_for"),0 then

    stripaddr = mid("http_x_forwarded_for"),1, instr("http_x_forwarded_for"),1)

    elseif instr("http_x_forwarded_for"),0 then

    stripaddr = mid("http_x_forwarded_for"),1, instr("http_x_forwarded_for"),1)

    elsestripaddr = "http_x_forwarded_for")

    end if

    getusertrueip = trim(mid(stripaddr, 1, 30))

    end function

  5. Anonymous users2024-02-01

    Just use"remote_addr"This, you get because you run it locally, that's it.

  6. Anonymous users2024-01-31

    It's the IP address of the machine.。

  7. Anonymous users2024-01-30

    with"remote_host") to get the hostname of the client.

  8. Anonymous users2024-01-29

    Used in ASP"remote_addr") to obtain the client's IP address, but if the client is using the ** server to access, then the IP address of the ** server is obtained, not the real client IP address. If you want to get the real IP address of the client through the ** server, you need to use Crack"http_x_forwarded_for") to read. However, it should be noted that not every ** server will work"http_x_forwarded_for") to read the client's real IP, and some of them still read the server's IP this way.

    Another thing to note is that if the client is not accessed through the server, use the ("http_x_forwarded_for"The value will be empty. So, if you want to use this method in your program, you can do it like this:

    userip = "http_x_forwarded_for")

    if userip = then userip ="remote_addr")

    That is, if the client passes through the ** server, then take the value of http x forwarded for, and if it does not pass through the ** server, take the value of remote addr.

    General function: If you can't get the real IP of the client, you will get the **IP of the client

    private function getip()

    dim stripaddr

    if "http_x_forwarded_for") or instr("http_x_forwarded_for"),unknown") 0 then

    stripaddr = "remote_addr")

    elseif instr("http_x_forwarded_for"),0 then

    stripaddr = mid("http_x_forwarded_for"),1, instr("http_x_forwarded_for"),1)

    elseif instr("http_x_forwarded_for"),0 then

    stripaddr = mid("http_x_forwarded_for"),1, instr("http_x_forwarded_for"),1)

    else stripaddr = "http_x_forwarded_for")

    end if

    getip = trim(mid(stripaddr, 1, 30))

    end function

  9. Anonymous users2024-01-28

    ASP seems to only have direct functions, but JS does.

Related questions
7 answers2024-02-09

pwd=ffh6 extraction code: ffh6 resources include: PR32-bit software, PR64-bit software, Premiere Pro CC installation package, Premiere Pro installation package, PR introductory tutorial, various tutorials and a collection of crash tutorials.

13 answers2024-02-09

First of all, according to the characteristics of the computer laboratory, the Q&A function module can use the existing LAN topology to input and transmit information in the network environment, and store it in the host database server. Switch between group chat and one-on-one private chat with control over how you talk. >>>More

14 answers2024-02-09

> deleted.

As you can see from the above, the parameter you want to pass is named id >>>More

7 answers2024-02-09

int sum=0;

for(int i = 0 ;i< -1;i++) assumes that the ID of the datalist is datalist1 >>>More

2 answers2024-02-09

Know, you can earn 42 experience points per day:

2 points for the first login, 20 points for voting, and 20 points for the first 10. >>>More