I need a simplet php code to integrate with my existing codes, which achieves the following.
When a member click a link on my website links to a file in one directory called "Lending" directory, normally it will open the file directly, I want the files in the directory not only be protected, but also allows one viewer at a time. Meaning, if another member is accessing it, when clicking on the link, it will come to a page saying "it is not avaiable right now, check back later, etc". If no body is reading it, it will open the page like normal.
It should be just a simple "If, else" function controling the direction of pages to be accessed. Also a checking system first check if the file is being accessed by another member.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased.