Start Free Trial
Come for the solution, stay for everything else.
Start Free Trial
I need a piece of code (using pure VB6 code) to extract the IP address from an IPv6 IP address
I am testing my website on Vista and need a visual basic function (used in classic asp) to extract the IP address from an Ipv6 address.
Visual Basic Classic
8/22/2022 - Mon
Havn't tested it but I believe the return values for the ServerVariables will depend upon whether or not IPv6 is enabled on IIS and whether or not the http request is coming from a system that has IPv6 enabled.
Dim strServername, strLocalname, strServerIP
strServername = UCase(Request.ServerVariab
R_NAME")) ' Server's name
strServerIP = UCase(Request.ServerVariab
_ADDR")) ' Server's IP address
strRemoteIP = UCase(Request.ServerVariab
E_ADDR")) ' Client's IP address
Response.write "Server Name = " & strServername
Response.write "Local Addr = " & strServerIP
Response.write "Remote Addr = " & strRemoteIP
The proiblem is that with IPV6 I'm getting with the REMOTE_ADDR the new address format like: 2001:0db8:85a3:08d3:1319:8
From this address I need to extract the IP address like 123.456.78.910
ASKER CERTIFIED SOLUTION
Log in or sign up to see answer
Become an EE member today
7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
Plans and Pricing
Certified Expert Program
© 1996-2022 Experts Exchange, LLC. All rights reserved. Covered by US Patent