Skip to content

manageryzy/Light-php-CDN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LIGHTphpCDN

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 'CDN.inc.php' to your server.Set the parameter in the CDN.inc.php.

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.

###Tasks

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
  • [email protected]
  • About

    An lightweight CDN program wrote in php

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published

    Languages