Reputation: 277
I am looking for C or C++ solution to check domain name on current machine just like CGI and $ENV{'HTTP_HOST'} does it.
Thanks for any example, advice, resource I will appreciate all ;)
Upvotes: 0
Views: 1642
Reputation: 9062
On linux, you may use hostname command.
hostname
On windows, the solution is described here.
Upvotes: 1