I am developing a wordpress plugin.
In this plugin, I am trying to get the server host name.
Is it possible?
I see tags / filters like:
But they do not work in plugins.
I would just use the predefined PHP variable $ _SERVER, and not worry about whether the WP function is available or not.
echo $_SERVER['SERVER_NAME'];
will give you something like: www.example.com
http://www.php.net/manual/en/reserved.variables.server.php
I think you could use bloginfo ('url'); which gets baseurl or are you looking for something else
init Hook. , /.