Example: /Network/DNS Hostname IP

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

/Network/DNS Hostname IP


Required plugins for this example: MBS Network Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Network/DNS Hostname IP

This example is the version from Tue, 8th Apr 2013.

Project "DNS Hostname IP.xojo_binary_project"
Class Window1 Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
EventHandler Sub Open() dim ip as string // you can put here your IP and see what it is reverse dim name as string = DNSAddressToNameMBS("91.37.67.178") List.AddRow "91.37.67.178", name, "IPv4" if name<>"" then List.AddRow name, DNSNameToAddressMBS(name), "IPv4" List.AddRow name, DNSNameToAddressIPv6MBS(name), "IPv6" end if // try localhost List.AddRow "127.0.0.1", DNSAddressToNameMBS("127.0.0.1"), "IPv4" List.AddRow "::1", DNSAddressToNameIPv6MBS("::1"), "IPv6" List.AddRow "localhost", DNSNameToAddressMBS("localhost"), "IPv4" List.AddRow "localhost", DNSNameToAddressIPv6MBS("localhost"), "IPv6" // now try a few websites forwards and backwards ip = DNSNameToAddressMBS("www.realbasic.com") List.AddRow "www.realbasic.com", ip, "IPv4" if ip<>"" then List.AddRow ip, DNSAddressToNameMBS(ip), "IPv4" end if ip = DNSNameToAddressIPv6MBS("www.realbasic.com") List.AddRow "www.realbasic.com", ip, "IPv6" if ip<>"" then List.AddRow ip, DNSAddressToNameIPv6MBS(ip), "IPv6" end if ip = DNSNameToAddressMBS("www.google.com") List.AddRow "www.google.com", ip, "IPv4" if ip<>"" then List.AddRow ip, DNSAddressToNameMBS(ip), "IPv4" end if ip = DNSNameToAddressIPv6MBS("www.google.com") List.AddRow "www.google.com", ip, "IPv6" if ip<>"" then List.AddRow ip, DNSAddressToNameIPv6MBS(ip), "IPv6" end if ip = DNSNameToAddressMBS("www.apple.com") List.AddRow "www.apple.com", ip, "IPv4" if ip<>"" then List.AddRow ip, DNSAddressToNameMBS(ip), "IPv4" end if ip = DNSNameToAddressIPv6MBS("www.apple.com") List.AddRow "www.apple.com", ip, "IPv6" if ip<>"" then List.AddRow ip, DNSAddressToNameIPv6MBS(ip), "IPv6" end if End EventHandler
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project

See also:

The items on this page are in the following plugins: MBS Network Plugin.


💬 Ask a question or report a problem