title: Alternative to WordPress's get_site_url()
body: <p>I'm trying to get the value similar to the WordPress site url to identify a certain WordPress installation.</p>
  
  <p>Since the <code>get_site_url</code> can get altered (with a plugin or directly) I came up with this:</p>
  
  <pre><code>untrailingslashit('http://'.$_SERVER['HTTP_HOST'].str_replace($_SERVER['DOCUMENT_ROOT'],'', ABSPATH));
  </code></pre>
  
  <p>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?</p>