0

I would like to know how I can stop other webmasters from hotlinking my flash application and using it on their websites.

Tunaki
  • 132,869
  • 46
  • 340
  • 423
makmour
  • 2,099
  • 3
  • 16
  • 12

2 Answers2

2

The easiest way to do this is to have your web server code check the HTTP Referer header and block the download if it's not from your site. If you tell us which server-side platform you've got, we may be able to give you a more specific answer than that.

Jacob
  • 77,566
  • 24
  • 149
  • 228
  • +1 for the nice idea, can you please tell me how to apply HTTP Referer header idea for my Ruby On Rails app ? – simo Dec 30 '12 at 06:24
2

Have the flash app check the domain and if it fails to be on your domain make it redirect to your site. Let the other webmasters drive traffic to your site. :)

    import flash.net.LocalConnection;
    var lc:LocalConnection = new LocalConnection();
    switch( lc.domain ){
      case "localhost":
      case "mydomain.com"
        break;
      default:
        // do redirect here
}

I use a switch statement to detect this, because if you are testing your app and running under the local file system it will be localhost and obviously you don't want to redirect during testing

The_asMan
  • 6,364
  • 4
  • 23
  • 34
  • I like this approach better than the webserver-based approach, for the main reason that it prevents a poacher from downloading the SWF and uploading it to his own site. – Matt Howell Apr 14 '11 at 03:42
  • Well, they can still do that. They will just have to de-compile the swf and remove the redirect code. But then again anything client-side can be stolen so its a catch 22. And he will still be driving traffic to your site before he figures it out. – The_asMan Apr 14 '11 at 03:48
  • Something else you might think about. Take this idea and use but when the app connects to the server for data you use Jacob's idea on the data page and not dish it. Lets face it data is always more important then the app itself. – The_asMan Apr 14 '11 at 03:51
  • I get your points, thing is that I know scrap from flash. I tried doing the same with .htaccess but it only works with FF and Opera. This guy from Pakistan is using my speedtest application and my bandwidth even though I have a speed test widget for free so that other webmasters can use it. I already reported him but I still need to do something with my application because it can happen again or it may be happening with other websites I m not aware of. – makmour Apr 15 '11 at 06:29
  • Ban the Pakistan IP block. If you need more ideas I am sure I can provide :) – The_asMan Apr 15 '11 at 17:56