Jump to content

Need help making a script to work as SimpleCDN's mirror buckets


Maunose

Recommended Posts

I'm learnin PHP but i'm still far from being able to make something like this...

 

I think what i need is not something hard to be done...

 

i have 3 shared hosting accounts on different company and a dedicated server that will work as the source of the files,

i want to mirror the files from the source server to the 3 shared accounts, but i need something more like.. realtime, so i thought on something like this:

 

Client request the file. like: http://shared01/mirror.php?f=file.rar

Script check if file already exist on mirror.

If file doesn't exist, check filesize of original file from source,

then try to download file from the other mirrors first but always checking if filezise is the same as source

if can't find on other mirrors, download from source.

if file exist, check if files are the same with a filezise checking,

then finally, send file to client.

 

would it be hard to make?

 

and while it's downloading the file from the other mirror or source, it can't disconnect the client.

 

I'll use it on the videos of my website, so all the files are on the same directory.

 

Don't need to make the script for me if you're not feeling like to, but just point me on the right directions to make this...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.