Jump to content

Force ad before hotlinked .swf files?


Gutspiller

Recommended Posts

I am not a programmer, but I'm a webmaster facing a problem.

 

I have a website and people are hotlinking to my .swf files. I do not want to stop all hotlinking though, instead is what I want to do, and want to know if it's possible to do, is this:

 

Can I get it so that people that hotlink to flash files, get an ad before the flash loads, without editing the "real" .swf?

 

For example:

1. I post the actual .swf file to my site.

2. Then someone embeds a direct link to that .swf file on their site or blog, etc.

3. My server, when serving .swf files realizes when the .swf file isn't coming from my domain.

4. It makes the direct .swf embed be an embed to a wrapper (I think is what it would be called) type of flash file that has an ad and a start button.

5. The real .swf file is loaded on the external domain once the start button is clicked in the "wrapper".

 

Few questions:

1. So again, my question is this, is something like this possible, so I can gain some money from those sites ALREADY hotlinking to the .swf files on my server?

2. If this isn't possible to get on already previous hotlinked .swf files, is something like the example mentioned above possible from a new start, so that when people link to an .swf file on my site, they think they're getting the file, but in reality they're getting the wrapper that displays the ad first, and then it calls the real .swf file?

3.I am not currently looking for a programmer to do this work, but I am interested in a rough estimate so I can make plans on how I should proceed for my current problem.

 

Thanks for any input you can provide me with on this subject. Sorry if this is more about flash programming than php programming, I don't know how it would be programmed.

Link to comment
Share on other sites

This can be done in apache, using the referrer header.  I don't think you can do it in PHP unless you tell apache to direct all your swf requests to a php script, which can then decide if it's going to serve the real file or serve an ad.

 

A determined user can still download your swf files directly by faking the referrer, but it doesn't sound like that's the case you're interested in.  People clicking through on hotlinks will still get intercepted and shown ads.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.