Jump to content

How to "capture" the IP address


friends
 Share

Recommended Posts

Hi all.

I wonder how to write a script that can capture a certain portion of the IP address.

Eg. 192.168.24.21

The above IP address, I only wanted to capture the 3rd column of IP, which is

24 in this example.

Anybody knows how to do that ? Please provide a working example.

Thank you....

Does that need to use array ?

Link to comment
Share on other sites

$ip= "192.168.24.21"
$myArray= StringSplit($ip, '.')
MsgBox(0, "3rd. number", $myArray[3])

<{POST_SNAPBACK}>

that simple... wow ! i thought it would be complex !

thanks.... i'll try it out !

to you guys (expert), it is really a "softball" :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...