Sign in to follow this  
Followers 0
Alek

Domain to ip

10 posts in this topic

How can i get the ip to a domain name, like autoitscript.com IP is 64.111.104.70


[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites



command line > ping autoitscript.com

how can i get the data from the command line then

[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites

TCPNameToIP ( name )

:)

i think thats for the computers name and not a domain, it dident work for me

[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

i think thats for the computers name and not a domain, it dident work for me

You did look at the helpfile and added TCPStartup() ?

:)

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

You did look at the helpfile and added TCPStartup() ?

:)

the script works perfectly if i add the servers ip to the client, but i want to improve the script so that the client can connect to a domain

Edit, nvm i got it to work, the bug was nuged deep inside the script :P

Edited by Alek

[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

perdy funnie :) try the help file for JdeB's answer :P

Small adaptation . . . to get Ip

CODE
; Example 1

#include <inet.au3>

Dim $sResult, $sIp

TCPStartup()

$sIp = TCPNameToIP("hiddensoft.com")

If @error Then

MsgBox(0, "_TCPIpToName()", "@error = " & @error & @LF & "@extended = " & @extended)

Else

MsgBox(0, "hiddensoft.com realy is:", $sIp)

EndIf

Small adaptation . . . to get Domain

CODE
; Example 2

#include <inet.au3>

Dim $sResult, $sIp

TCPStartup()

$sIp = "64.111.104.70"

$sResult = _TCPIpToName ($sIp)

If @error Then

MsgBox(0, "_TCPIpToName()", "@error = " & @error & @LF & "@extended = " & @extended)

Else

MsgBox(0, "hiddensoft.com realy is:", $sResult)

EndIf

Edit: I post so slow :)

Edited by Hatcheda

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