myspacee Posted August 11, 2008 Share Posted August 11, 2008 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. Link to comment Share on other sites More sharing options...
Xenobiologist Posted August 11, 2008 Share Posted August 11, 2008 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 Link to comment Share on other sites More sharing options...
Triblade Posted August 11, 2008 Share Posted August 11, 2008 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) Link to comment Share on other sites More sharing options...
myspacee Posted August 11, 2008 Author Share Posted August 11, 2008 perfect, thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now