大文件操作和对Apache Apache进行水印处理 [英] Big file manipulation and watermarking php Apache

查看:154
本文介绍了大文件操作和对Apache Apache进行水印处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在为我的数字网上商店寻求更好的解决方案.

我的情况是我有6个待售软件包,每个软件包在我的服务器上包含1GB的文件.
在压缩之前,这些文件将被唯一地加水印,以允许
每个买家下载-从任何文件中唯一标识买家的原因.(盗版原因)

问题是因为压缩后每个文件仍为700-800MB,并假设每天每个产品下载50个文件,这样算下来(50个下载x 6个产品x每个700MB)=我的服务器上每天有210GB的文件(如果我保留的话)每天供我的买家下载.

有没有更实用的方法来实现呢?
还是仅通过购买大量磁盘空间,行业专家就能做到这一点?

谢谢,
Brian

Hi all,

I am in a fix for a better solution here for my digital web shop.

My situation is that I have 6 packages for sale, each containing 1GB of files on my server.
These files will be uniquely watermarked before being compressed to allow for
download by each buyer - reason to uniquely identify the buyer from any file.(piracy reasons)

The problem is because each file is still 700-800MB after compression, and supposing 50 downloads per product a day, that will work out to (50 downloads x 6 products x 700MB each) = 210GB of files on my server everyday, if i keep them a day for my buyers to download them.

Is there a more practical method to implement this?
Or is this how the experts in the industry do it, just by buying lots and lots of disk space?

Thanks,
Brian

推荐答案

在提供下载内容时,您是否有任何原因无法即时进行水印处理?这样一来,您需要存储超过几分钟的全部内容仍然是您要保留的东西-客户名称和水印密钥.为此,您可能需要将水印设置为外部CGI(从Apache的角度来看),您可以从下载页面调用它.警告:您可能会遇到超时问题,具体取决于加水印过程需要多长时间.
一种也许更好但更复杂的方法是将您的水印器重铸为Apache模块并以流式方式提供结果.但是,需要做更多的工作,而且灵活性可能会降低.

[edit]为回应OP的评论而添加

对于CGI,请从此处开始.[
Is there any reason you can''t do the watermarking on-the-fly as you are serving the download? That way, all you need to store for more than a few minutes is stuff you''re keeping anyway - customer name and watermark key. To do this, you will probably need to set up your watermarker as an external CGI (from Apache''s perspective) that you can call from the download page. Warning: You might have timeout issues, depending on how long the watermarking process takes.
A maybe nicer but more complex way would be to recast your watermarker as an Apache module and stream-feed the results. MUCH more work, though, and quite likely less flexible.

[edit] added in response to OP''s comment

For CGI, start here[^] Essentially, whatever your program/script writes to stdout gets sent to the client.
Can you get the customer to wait a minute or two while you prepare the download? Show ''em a movie or something :)
The other point I should have mentioned that you can buy a 2TB HDD (almost 10 days worth on your numbers) for around US


100.大型机的古老口头禅是多加硬件"将是最轻松的方法.

[/edit]

[edit2]回应第二条评论

zip或rar可能就是您想要的.压缩和多个文件合二为一. IIRC zip文件中的目录"位于末尾,因此您可以流式传输多个文件,记住详细信息并在末尾写入目录.

[/edit2]

干杯,
彼得
100. Maybe the old mainframe mantra of "throw more hardware at it" would be the most painless way to go.

[/edit]

[edit2] in response to second comment

A zip or rar might be what you''re looking for. Compression and multiple files in one. IIRC the ''directory'' in a zip file is at the end, so you can stream multiple files out, remember the details, and write the directory at the end.

[/edit2]

Cheers,
Peter


这篇关于大文件操作和对Apache Apache进行水印处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆