Results 1 to 9 of 9

Thread: Website bandwidth stealing help

  
  1. #1
    Status
    Offline
    Garrie's Avatar
    AOC Fanatic
    Join Date
    Aug 2004
    Posts
    421
    Mentioned in
    0 Post(s)
    Quoted
    0 Post(s)

    Website bandwidth stealing help

    Hi,

    Does anyone know of a script I can use to stop people linking to pictures on one of my sites, its using a lot of bandwidth and I'm worried the site will be taken offline.

    Thanks in advance
    Garrie
    www.onemileahead.co.uk

  2. #2
    Status
    Offline
    Rob_1.816v's Avatar
    AOC Obsessed
    Join Date
    Nov 2004
    Posts
    1,012
    Mentioned in
    0 Post(s)
    Quoted
    0 Post(s)
    you could use some php or similar to check the referrer url, if its from your own site accept it, if not print a small message saying "sorry no can do" or similar, which will be small bandwidth

  3. #3
    Status
    Offline
    Sploodge's Avatar
    BAFPCITS
    Join Date
    Jul 2005
    Posts
    6,522
    Mentioned in
    0 Post(s)
    Quoted
    0 Post(s)
    Htaccess is the way if its a unix webserver..

    Just create a file called .htaccess in the folder on your site with the images in and put the following code in the file. Remember to chnage "mysite" and ".com" to represent your URL like "?astracoupeturbo\.co.uk/"

    [code]
    RewriteEngine On
    RewriteCond %{HTTP_REFERER** !^http://(.+\.)?mysite\.com/ [NC]
    RewriteCond %{HTTP_REFERER** !^$
    RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
    [/code]

    It is possible to take it further and just block certain domains from linking to your images but the above will do you I think.
    Mr Sploodge, Accept No Imitations!

  4. #4
    Status
    Offline
    wywywywy's Avatar
    AOC Obsessed
    Join Date
    Sep 2005
    Posts
    1,478
    Mentioned in
    0 Post(s)
    Quoted
    0 Post(s)
    Nice trick
    Astra Coupe Turbo Project Log KW var2, BK299, Apexi, HID, Angel, Leather Cobra, Phoenix Gold, GT/R2, Fluted, DV26D, Pre/Sports/Catback, CarPC, B&M, VXR Turbo, Tarox-10, Phase 3! Car is for sale!

  5. #5
    Status
    Offline
    Garrie's Avatar
    AOC Fanatic
    Join Date
    Aug 2004
    Posts
    421
    Mentioned in
    0 Post(s)
    Quoted
    0 Post(s)
    Beauty, thank you :-)

    Will give it a bash tonight..

    Thanks again
    Garrie
    www.onemileahead.co.uk

  6. #6
    Status
    Offline
    monolith's Avatar
    AOC Obsessed
    Join Date
    Jul 2006
    Posts
    2,543
    Mentioned in
    0 Post(s)
    Quoted
    0 Post(s)
    the only major issue with this however is that many big name firewall/antivirus software block referrer by default and many users do not unblock it

  7. #7
    Status
    Offline
    Sploodge's Avatar
    BAFPCITS
    Join Date
    Jul 2005
    Posts
    6,522
    Mentioned in
    0 Post(s)
    Quoted
    0 Post(s)
    the above blocks blank referers aswell.. so even if the referer info is stripped by an av/firewall, no piccys for them...

    Quote Originally Posted by monolith
    the only major issue with this however is that many big name firewall/antivirus software block referrer by default and many users do not unblock it
    Mr Sploodge, Accept No Imitations!

  8. #8
    Status
    Offline
    monolith's Avatar
    AOC Obsessed
    Join Date
    Jul 2006
    Posts
    2,543
    Mentioned in
    0 Post(s)
    Quoted
    0 Post(s)
    thats what i was getting at.

  9. #9
    Status
    Offline
    Sploodge's Avatar
    BAFPCITS
    Join Date
    Jul 2005
    Posts
    6,522
    Mentioned in
    0 Post(s)
    Quoted
    0 Post(s)
    Aaaaaaaah.... Ill have a look at allowing blank referers... I am sure its possible...

    Thought you ment the other way round

    Quote Originally Posted by monolith
    thats what i was getting at.
    Mr Sploodge, Accept No Imitations!

Similar Threads

  1. Stealing signal from Lambda
    By Meska in forum Turbo Petrol Engines inc. Transmissions
    Replies: 2
    Last Post: 21-05-2008, 22:54
  2. Bandwidth Error
    By MatG in forum Community and Site News
    Replies: 2
    Last Post: 31-07-2003, 19:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •