Someone steal my bandwidth

I just noticed an immediate increase bandwidth in one of my sponsored hosting website, www.alif.com.my. When I check the referer, I finds out there is one website who put my radio.blog into his website. He is feeding his visitor with my bandwidth.

So, I fire up google and search for “php how to check referer”, I found the hacks to solve it. This script will actually check for referer before it loads. Specify your own server, replace www.mysite.com. If the request was not from www.mysite.com, it will just display, “Nice try

< ?php if ( eregi ( "www.mysite.com", $_SERVER['HTTP_REFERER'] ) ) { // do something } else { echo "Nice try"; } ?>

Now, the website cannot view the radio blog in his website. Instead, there is a message comming out 🙂

No more bandwidth stealing