Is there anyway to stop people from hotlingking flash files?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Phil
    Confirmed User
    • Jan 2004
    • 7659

    #1

    Is there anyway to stop people from hotlingking flash files?

    I got hijacked by chinese leachers. need help asap..
    Ask Phil
  • IllTestYourGirls
    Ah My Balls
    • Feb 2007
    • 14311

    #2
    just flash?

    Comment

    • Tempest
      Too lazy to set a custom title
      • May 2004
      • 10217

      #3
      setup some streaming instead... simple php streaming can do the trick for most hotlinking.

      Comment

      • Phil
        Confirmed User
        • Jan 2004
        • 7659

        #4
        Originally posted by IllTestYourGirls
        just flash?
        yes, flash videos.
        Ask Phil

        Comment

        • X37375787

          #5
          Can't you have your host block the requesting referrers?

          Comment

          • sfera
            Confirmed User
            • Aug 2005
            • 8597

            #6
            make your site the only referral. also would block chinese ips.

            Comment

            • Phil
              Confirmed User
              • Jan 2004
              • 7659

              #7
              Originally posted by sfera
              make your site the only referral. also would block chinese ips.
              is there any way to block any hotlinking of all flash files, not just chinese?
              Ask Phil

              Comment

              • boneprone
                Hall Of Fame
                • Jan 2001
                • 34415

                #8
                YEah there is. We had the same issue. Our host did something about it. Like a htaccess kinda thing

                Industry Hall Of Fame Legend Mike Jones
                Bow to the Power - Still BP4L
                http://gfyawards.com/hall-of-fame
                Learn about it kids.

                Comment

                • Phil21
                  Confirmed User
                  • May 2001
                  • 993

                  #9
                  You can use referral blocking (mod_rewrite type of stuff) and it's generally "good enough" for a casual deterrent.

                  However, many browsers do *not* send a refferer header string for flash movie content, thus you cannot truly rely on it. Most sites won't bother hotlinking though, when 30-60% or whatever traffic doesn't get a good pageload.

                  The best way to do it is via secure download tokens, like lighttpd's mod_securedownload and about 5,000 others. Basically, you have your PHP code generate a link to the movie with a hash, using a shared secret. Your webserver then checks to ensure that this hash is valid prior to serving the file in question.

                  If both the PHP and the static files (.flv) are hosted on the same webserver instance, you can use a myriad of off-the-shelf anti-hotlink products. Nearly anything on the market.

                  If they are hosted elsewhere, most products will no longer work - and you'll want something like the hash sharing mechanism outlined above.

                  As for PHP "streaming" - yeah, if you want to do about 1/100th of what the server can actually push, sure Running static files through PHP is a horrible idea, unless you simply don't have enough traffic for it to matter and it's the easiest solution for your particular developers.

                  Regards,

                  -Phil
                  Quality affordable hosting.

                  Comment

                  • Voodoo
                    ♥ ♦ ♣ ♠
                    • Sep 2002
                    • 10600

                    #10
                    Try this:

                    Code:
                    RewriteEngine On
                    RewriteCond %{HTTP_REFERER} !^$
                    RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com(/)?.*$ [NC]
                    RewriteRule .*.(jpg|flv)$ - [NC,F]
                    Found it on Google, I haven't tested it though.
                    Last edited by Voodoo; 10-18-2008, 08:03 PM.

                    "I'm selflessly supporting the common good, but only coincidentally looking out for No.1."

                    Comment

                    • Naughty-Pages
                      Confirmed User
                      • Oct 2006
                      • 4533

                      #11
                      Originally posted by Voodoo
                      Try this:

                      Code:
                      RewriteEngine On
                      RewriteCond %{HTTP_REFERER} !^$
                      RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com(/)?.*$ [NC]
                      RewriteRule .*.(jpg|flv)$ - [NC,F]
                      Found it on Google, I haven't tested it though.
                      yup.. although that includes jpg's..

                      i use a similar code on all of our servers for mainly jpg's and gif.. to keep bandwidth down..

                      Comment

                      • fujiko
                        Confirmed User
                        • Jan 2008
                        • 566

                        #12
                        Originally posted by Voodoo
                        Try this:

                        Code:
                        RewriteEngine On
                        RewriteCond %{HTTP_REFERER} !^$
                        RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com(/)?.*$ [NC]
                        RewriteRule .*.(jpg|flv)$ - [NC,F]
                        this code doesnt protect flv hotlinking on firefox... ive tried it.
                        .

                        Comment

                        • boneprone
                          Hall Of Fame
                          • Jan 2001
                          • 34415

                          #13
                          Listen to Phil21..

                          He's the one who PERSONALLY helped me and fixed our problem.

                          Industry Hall Of Fame Legend Mike Jones
                          Bow to the Power - Still BP4L
                          http://gfyawards.com/hall-of-fame
                          Learn about it kids.

                          Comment

                          • papill0n
                            Unregistered Abuser
                            • Oct 2007
                            • 15547

                            #14
                            Originally posted by Phil21
                            You can use referral blocking (mod_rewrite type of stuff) and it's generally "good enough" for a casual deterrent.

                            However, many browsers do *not* send a refferer header string for flash movie content, thus you cannot truly rely on it. Most sites won't bother hotlinking though, when 30-60% or whatever traffic doesn't get a good pageload.

                            The best way to do it is via secure download tokens, like lighttpd's mod_securedownload and about 5,000 others. Basically, you have your PHP code generate a link to the movie with a hash, using a shared secret. Your webserver then checks to ensure that this hash is valid prior to serving the file in question.

                            If both the PHP and the static files (.flv) are hosted on the same webserver instance, you can use a myriad of off-the-shelf anti-hotlink products. Nearly anything on the market.

                            If they are hosted elsewhere, most products will no longer work - and you'll want something like the hash sharing mechanism outlined above.

                            As for PHP "streaming" - yeah, if you want to do about 1/100th of what the server can actually push, sure Running static files through PHP is a horrible idea, unless you simply don't have enough traffic for it to matter and it's the easiest solution for your particular developers.

                            Regards,

                            -Phil
                            Great post Phil

                            Comment

                            • NY Jester
                              Confirmed User
                              • Nov 2007
                              • 1347

                              #15
                              i was thiking htaccess but Phil21 seems to have a better way for sure.
                              Jester X Web Services
                              ICQ: 147 079 406
                              *MadCatLinks.com*

                              Comment

                              • Naughty-Pages
                                Confirmed User
                                • Oct 2006
                                • 4533

                                #16
                                Originally posted by fujiko
                                this code doesnt protect flv hotlinking on firefox... ive tried it.
                                this has nothing to do with firefox LOL.. this is related to the server

                                (FYI: the yoursite.com is the site(s) you will allow to hotlink)

                                (instead of using it in htaccess i use it in a separate server-wide rules file..)

                                Comment

                                • james_clickmemedia
                                  Confirmed User
                                  • Apr 2003
                                  • 2204

                                  #17
                                  Originally posted by Phil21
                                  You can use referral blocking (mod_rewrite type of stuff) and it's generally "good enough" for a casual deterrent.

                                  However, many browsers do *not* send a refferer header string for flash movie content, thus you cannot truly rely on it. Most sites won't bother hotlinking though, when 30-60% or whatever traffic doesn't get a good pageload.

                                  The best way to do it is via secure download tokens, like lighttpd's mod_securedownload and about 5,000 others. Basically, you have your PHP code generate a link to the movie with a hash, using a shared secret. Your webserver then checks to ensure that this hash is valid prior to serving the file in question.

                                  If both the PHP and the static files (.flv) are hosted on the same webserver instance, you can use a myriad of off-the-shelf anti-hotlink products. Nearly anything on the market.

                                  If they are hosted elsewhere, most products will no longer work - and you'll want something like the hash sharing mechanism outlined above.

                                  As for PHP "streaming" - yeah, if you want to do about 1/100th of what the server can actually push, sure Running static files through PHP is a horrible idea, unless you simply don't have enough traffic for it to matter and it's the easiest solution for your particular developers.

                                  Regards,

                                  -Phil
                                  Exactly what we have been using for years. Something about sessions is all I remember when our programmers explained it.
                                  $ CLICKMEMEDIA.COM $ CONVERTING ETHNIC TRAFFIC SINCE 1998 ~ $30+PPS
                                  BLACK-X.COM - NEW BLACK EX-GF SITE
                                  CLICKMEMEDIA.COM ~ ICQ - 8788771

                                  Comment

                                  Working...