If you just do a Topic search for "MX" you'll find several examples, including..
Announcement
Collapse
No announcement yet.
Working DNS Query?
Collapse
X
-
Guest repliedThanks for the reply
What I am looking for through is a way to query a DNS server for a specific record. (IE MX, A name etc)
The MX record is most important to me but I also am interested in most other records as well.
Leave a comment:
-
If you mean resolving IP addresses to hostnames and viceversa, then HOST NAME and HOST ADDR are the PB functions to use.
Code:#COMPILE EXE FUNCTION PBMAIN() AS LONG '// Resolve a hostname to its IP address DIM p AS BYTE PTR HOST ADDR "www.powerbasic.com" TO ip& p = VARPTR(ip&) STDOUT USING$("#_.#_.#_.#", @p, @p[1], @p[2], @p[3]) '// Resolve that IP address back to its hostname HOST NAME ip& TO hostname$ STDOUT hostname$ WAITKEY$ END FUNCTION
Leave a comment:
-
Working DNS Query?
Does anyone know of a working DNS query example for PBCC?
I have tried to compile, rework, modify every example posted to no avail.
Anyone have a working example that will compile under PBCC3.0?Tags: None
Leave a comment: