DannyS
DannyS

Reputation: 277

C / C++ How to check domain name on current machine?

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

Answers (1)

Paul92
Paul92

Reputation: 9062

On linux, you may use hostname command.

On windows, the solution is described here.

Upvotes: 1

Related Questions