
Originally Posted by
jscheuer1
I don't do PHP but in JavaScript:
<script>
if (parent.location.href=='http://gtec.cjb.cc')
document.write('your message goes here')
</script>
perhaps this can be adapted to PHP.
Yes:
PHP Code:
<?php if('gtec.cjb.cc' === $_SERVER['HTTP_HOST']) { ?>
<!-- Content to insert here. -->
<?php } ?>
would perform basic content insertion.
This wouldn't work with HTTP/1.0 clients as they don't send a Host header. However, I don't think there are that many HTTP/1.0 clients left - I'm not honestly sure when HTTP/1.1 became widely implemented.
if (parent.location.href=='http://gtec.cjb.cc/index.htm') //use the correct filename here
An alternative would be to do a substring search:
Code:
if(-1 != document.URL.indexOf('gtec.cjb.cc')) {
Mike
Bookmarks