I'm not sure what you mean by 'dimdim accessing the page'. Some things to note:
HTTP_REFERER contains the url of the page that linked to the current one. For example, my development server is a mac on my network here at my home office. I put a file 'foo.php' on that computer which has nothing in it but this:
<a href="bar.php">click me</a>
If you load foo.php using a browser by visiting http://192.168.1.2:8888/foo.php (which is only valid on my local network so it won't work for you) then you click the 'click me' link, you are directed to http://192.168.1.2:8888/bar.php.
Inside bar.php, the value of HTTP_REFERER is http://192.168.1.2:8888/foo.php.
// this is bar.php
echo $_SERVER['HTTP_REFERER']; // outputs http://192.168.1.2:8888/foo.php
Given all that, I don't understand why you would want to offer access to your private area if HTTP_REFERER is NOT from dimdim. Maybe I'm missing something. Just to be clear:
$referer = $_SERVER['HTTP_REFERER'];
$pattern = '/dimdim/';
if (preg_match($pattern, $referer)) {
// user clicked a link at dimdim to get here...or maybe this page is loaded in an iframe hosted by dimdim or something
} else {
// user was NOT referred to this page from DIMDIM
}