php - How reliable is HTTP_HOST, and will it work for search bots?
<p>I have numerous domains and rather than create content for each one individually, I'm using the following code in each index.php page to display the relevant page from another site I own (where 'getDomain' is a function for getting just the domain from a url):</p>

<pre><code>&lt;?php
$domain = $_SERVER['HTTP_HOST'];
$domain = getDomain($domain);
$crawl = "http://example.co.uk/page.php?domain=$domain";
$request = curl_init($crawl); 
print curl_exec($request); 
curl_close($request);
?&gt;
</code></pre>

<p>Anyway, my questions are 1) is it reliable to use HTTP_HOST like this and 2) will search engine bots index my page or will they just get an error?</p>

<p>My hunch is that I'm better off entering the domain name into each index.php page - but I'd rather not have to do that!</p>

<p>Any help greatly appreciated!</p>
