Sign in to follow this  
Followers 0
myspacee

IP an DNS name

4 posts in this topic

hello,

i'e a request.

Made small script that monitor a list (with ping) of machine and build an html page with status.

Based on text file with a list of IP, script can obtain DNS from IP with :

TCPStartup()
        $IPtoNAME =  _TCPIpToName($line)
        TCPShutdown()

if i have dns, script must understand that is necessary to obtain IP from DNS,

but before it must understand that machine address is not numeric but DNS value.

Can anyone help me?

thank you,

m.

Share this post


Link to post
Share on other sites



Hi,

you got a string and need to check whether it is an IP or a hostname?

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

I have used the following in my Ping (named: pong) script.

See my signature for this script.

If StringRegExp($line, "(\d+\.\d+\.\d+\.\d+)", 0) = 1 Then ...; Check if $line is an IP address

If you use then sentence you can check whether the $line (input) is an IP address. If not (outcome = 0) then it's not an IP and probably a DNS name.


My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

Share this post


Link to post
Share on other sites

perfect,

thank you!

Share this post


Link to post
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
Sign in to follow this  
Followers 0