php - let the visitor download a remote file, chunk by chunk (range) -
it's recurring question on stackoverflow , i've browsed existing suggestions unsuccessfully.
here's i'm trying achieve:
- visitor comes webpage , have send him large file download.
- file located on remote server, , requires either basic auth or cookie. me owns cookie/credentials.
- managed download file using wget serve visitor via x-sendfile mod (apache), requires waiting end user before download.
- i'd serve download asap, mean website act kind of proxy or something.
- tried using bunch of codes curl, fsockopen/feof, etc either crashes apache once in while, either it's blocking connexion (visitor cannot browse website anymore long has not finished downloading), either it's destroying ressources since php tries put huge file in memory guess.
so sum up:
- should able serve remote file downloading possible
- ideally serving chunk chunk / range range ?
extra info: php 5.2.13, gentoo, libcurl 5.2.13
sending chunk chunk require kind of torrent solution can tell.
Comments
Post a Comment