I'm trying to get the value similar to the WordPress site url to identify a certain WordPress installation.
Since the get_site_url
can get altered (with a plugin or directly) I came up with this:
untrailingslashit('http://'.$_SERVER['HTTP_HOST'].str_replace($_SERVER['DOCUMENT_ROOT'],'', ABSPATH));
This gives me good result to identify the WordPress based on it address but I'm curios if this may cause troubles on some server installations?