Skip to content
An lightweight CDN program wrote in php
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This project is an light weight mirror manage system wrote in php.

##Why open this project?

Many Server on the Internet is fast,but they can only use php as the server script. You can't use the existing system to manage them if you want to use them as your file server. You have to use FTP to send file between them.So I just make this little tool to send data between servers.

##Quick start. Coming soon. ##Manual ###Requirement A php environment is required , at least PHP 4.5. Some PHP modules is needed ,such as mcrypt. ###Setting up

Upload the file 'CDN.php' and '' to your server.Set the parameter in the

Here are all the parameters.

  • ACCEPT_HOST - Only the HTTP Repuest with this host name would be accepted
  • IS_ROOT_SERVER - Set to be true if this server is the root server.
  • SERVER_KEY - The key for AES in this server.
  • SOURCE_SERVER_PATH - The path for father server.It will be ignored at the root server.
  • SOURCE_SERVER_HOST - The Host for father server.This server will use this host name to visit father server.
  • SOURCE_SERVER_KEY - The AES key for father server.
  • Enable_Log - Set to be true if you want to log events.

After editing your inc file, you should create a directory called 'data'.Here will be the place where putting your files.

If all the tasks is done, you should be able to visit the page and use the task parameter to do an task.You should do the task 'add' first.


Here are the tasks.

  • list - List the files in this server , this task should only called by the child server.
  • get - Get an file, This task should only called by the child server.
  • add - Refresh the cache file.Just like the command in git.
  • clone - clone the father server.This command will be called automatically by the root server.
  • push - Call the clone task in all the child server.
  • help - Useless help info XDD.
##Licence Apache License 2.0 Just use.Have fun! ##Author
  • You can’t perform that action at this time.