Jump to content

Domain to ip


Alek
 Share

Recommended Posts

  • Developers

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

TCPNameToIP ( name )

:)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

ofc i did, 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

This is not working for you?

TCPStartup()
MsgBox(0,"",TCPNameToIP("autoitscript.com"))
TCPShutdown()

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

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
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...