-
-
Notifications
You must be signed in to change notification settings - Fork 11
DNS Example
Andrew Lambert edited this page Jun 8, 2015
·
10 revisions
This example specifies a custom IP address that will be used instead of a DNS lookup for a specific hostname.
Dim dns As New libcURL.ListPtr
Dim host, IP As String
host = "www.example.com:80"
IP = "192.168.1.4"
Call dns.Append(host + ":" + IP)
Dim curl As New cURLClient
Call curl.SetOption(libcURL.Opts.RESOLVE, dns)
If Not curl.Get("http://www.example.com/") Then
MsgBox(libcURL.FormatError(curl.LastError))
End IfWiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2014-26 Andrew Lambert, offered under the CC BY-SA 3.0 License.