From: C. Kevin Provance on

"Karl E. Peterson" <karl(a)exmvps.org> wrote in message
news:humo80$vsn$1(a)news.eternal-september.org...
:
: There's a site like that, out there, that was linking directly to my
: downloads. The thieves wouldn't answer my emails, so I wrote some code
: on my site to recognize when a download request was coming from
: somewhere else. And when that happens, I redirect instead to the page
: the describes the download. <eg> Example:
:
: http://www.brothersoft.com/karl-e.-peterson-console-198303.html

Very cool. Neat trick.

From: Mayayana on
| I redirect instead to the page
| the describes the download. <eg> Example:
|
| http://www.brothersoft.com/karl-e.-peterson-console-198303.html
|

That's a nice, diplomatic solution.

| Brothersoft.com is a pack of scumball thieves!
|

They're focused on shareware. Most of the
shareware sites expect a direct link. I provide
that for software that could make a sale. Though
that whole scenario has changed a lot. It used
to be that download sites were the advertising
for authors, while authors provided the content for
download sites. Now, download sites don't make
much money from ads and authors don't make
many sales. The downhill slide worsened when CNet
got sleazy and started charging for good placement
or timely reviews. Before long they were all doing
it -- pretending to be "libraries" or neutral reviewers
but operating as advertisers. These days I get several
emails per week from sites that are offering me a
5-star rating in exchange for a link-back and an ad
purchase. :)

I ask people not to link directly to my free downloads,
but some people just don't care. Up until now I've
just renamed the downloads in those cases. But I like
your method. Could you explain how that works? I'm
on Unix. I could do a redirect in the .htaccess file, but
I don't understand how I can process the referrer, and
I'm not sure how big my .htaccess file can get before
my host complains. (It's already fairly big with various
301 redirects and code to block download helpers.)



From: Karl E. Peterson on
Mayayana has brought this to us :
>> I redirect instead to the page
>> the describes the download. <eg> Example:
>>
>> http://www.brothersoft.com/karl-e.-peterson-console-198303.html
>
> That's a nice, diplomatic solution.

I was going to raise hell with their providers, but then I second
thoughts led me to conclude I could basically use it as free publicity.
The only very minor drawback is, they use a new window link, so the
poor user still has one window open to the thieve's site.

>> Brothersoft.com is a pack of scumball thieves!
>
> They're focused on shareware. Most of the
> shareware sites expect a direct link. I provide
> that for software that could make a sale. Though
> that whole scenario has changed a lot. It used
> to be that download sites were the advertising
> for authors, while authors provided the content for
> download sites.

That makes sense. I never thought about it in those terms. I still
think they should've responded to my initial "STOP THAT!" email,
though.

> I ask people not to link directly to my free downloads,
> but some people just don't care. Up until now I've
> just renamed the downloads in those cases. But I like
> your method. Could you explain how that works?

First, I had to put all the downloads in an unadvertised location, to
prevent direct linkage. Then, I wrote a little "snatch" page that
could be fed a download request and initiate the download using the ASP
Response object and another simple StupidFileTricks (sft) object I
wrote:

If sft.GetFileSize(FileName) Then
' return appropriate headers followed by the body of the document
Response.Expires = 0
Response.Buffer = True
Response.Clear
Response.ContentType = "application/octet-stream"
Response.AddHeader "content-disposition", "attachment; filename="
& StripPath(FileName)
Response.BinaryWrite sft.GetFileBytes(FileName)
Response.Flush
End If

But(!), before the download is initiated, I first test the
Request.ServerVariables("HTTP_REFERER") value to see if it's one of the
strings my site answers to:

Sites = Array("vb.mvps.org", "classicvb.net", "www.vb.mvps.org",
"www.classicvb.net", "localhost")

If the referrer isn't in that list, I redirect to the project page
rather than give them the file:

If ExternalLink() Then
If ProjectExists(Req) Then
Response.Redirect "./" & Req
Else
Response.Redirect "notfound.asp?id=" & Req
End If
Else
If FileExists(TheFile) Then
Call SendDownload(TheFile)
End If
End If

> I'm on Unix.

I *wish* this method were an option on Unix, but I'm pretty sure only
Windows servers support ASP? I don't know if the above might
"translate well" into some sort of mechanism on that side?

> I could do a redirect in the .htaccess file, but
> I don't understand how I can process the referrer, and
> I'm not sure how big my .htaccess file can get before
> my host complains. (It's already fairly big with various
> 301 redirects and code to block download helpers.)

I think you can get at the referrer from javascript, can't you? I
suppose that's so easily disabled, that it'd only be half a solution,
though. The code really needs to execute on the server. I really
don't know, I'm afraid. I would dearly miss ASP if I had to move away
from it.

--
..NET: It's About Trust! http://vfred.mvps.org
Customer Hatred Knows No Bounds at MSFT
ClassicVB Users Regroup! comp.lang.basic.visual.misc
Free usenet access at http://www.eternal-september.org


From: Mayayana on
| I think you can get at the referrer from javascript, can't you? I
| suppose that's so easily disabled, that it'd only be half a solution,
| though. The code really needs to execute on the server. I really
| don't know, I'm afraid. I would dearly miss ASP if I had to move away
| from it.
|

OK, thanks. Most things seem to be doable in
PHP on Unix. I'll have to look into it.


From: Dee Earley on
On 09/06/2010 18:38, Karl E. Peterson wrote:
> Mayayana has brought this to us :
> But(!), before the download is initiated, I first test the
> Request.ServerVariables("HTTP_REFERER") value to see if it's one of the
> strings my site answers to:
>
> Sites = Array("vb.mvps.org", "classicvb.net", "www.vb.mvps.org",
> "www.classicvb.net", "localhost")
>
> If the referrer isn't in that list, I redirect to the project page
> rather than give them the file:
>
> If ExternalLink() Then
> If ProjectExists(Req) Then
> Response.Redirect "./" & Req
> Else
> Response.Redirect "notfound.asp?id=" & Req
> End If
> Else
> If FileExists(TheFile) Then
> Call SendDownload(TheFile)
> End If
> End If
>
>> I'm on Unix.
>
> I *wish* this method were an option on Unix, but I'm pretty sure only
> Windows servers support ASP? I don't know if the above might "translate
> well" into some sort of mechanism on that side?

Very easily done using PHP, Perl, mod_rewrite, etc..

--
Dee Earley (dee.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)