Hi, *** PM OFFERS - WILL PAY *** Can someone tell me how to grab domain referred in ASP ? Mainly I done this piece of code in PHP which works well but I would like to translate this code into ASP. Please, could someone help me? <?php echo ('Referring domain:</br>'); $ref = $_SERVER[SERVER_NAME]; // grab domain echo ($ref.'<br/>'); // show domain if ($ref == "www.domain.co.uk") { echo ('This domain is correct.'); } else { echo ('This domain is wrong.<br/>'); echo ('Added into HEAD section following META:<br><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">'); ?> <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> <? } ?> Code (markup):
The server variable "http_referer" holds the referring information. You can grab it with: ReferringDomain=request.servervariables("http_referer") Code (markup): Then to check it, you might do something like this: If ReferringDomain="www.domain.co.uk" then 'Correct domain else 'incorrect domain end if Code (markup):