views:

72

answers:

2

I am developing web applications for various clients. I also have libraries that I use in multiply projects and I also incorporate BSD and other open source libraries. I am using PHP server side.

I want to make the licensing clear both for my PHP and both for my JavaScript files, but at the same time I want to keep this simple, I want the copyright notices to be really short in the headers of both PHP and JS files.

How can I put all my licensing conditions into one file? Basically I want to reference 1 file from all my source files, and manage all copyright and licensing in that single file.

I am also interested in resources that can help me build my license i.e: pre written licenses.

+1  A: 
/**
 * This program is license under YOUR_LICENSE_OF_CHOICE
 * You should have received a copy of the YOUR_LICENSE_OF_CHOICE
 * With this program in the file LICENSE and is available through
 * the world-wide-web at http://license.homepage.net/path_to_license
 * If you did not receive a copy of the YOUR_LICENSE_OF_CHOICE 
 * And are unable obtain it through the world-wide-web,
 * Please send a note to [email protected] so we can mail you a copy
 * Immediately.
 */
racetrack
Is there a shorter version of this for web applications?
DjDarkman
Feel free to cut it short, basically you need to indicate which license the code is under, the name of the file you've put the license in, a URI to the license, and an email address in case someone didn't get the license file, and the web page vanished.
racetrack
+1  A: 

If you are using OpenSource licenses, use the disclaimer from the license website, look for section "How to Apply These Terms to Your New Programs". However, if this is proprietary license then this is up to you... explain how source code can and cannot be used... what can and cannot be done, etc.

Inserting license into the file should not be done manually! You can do that, but it is not the right way. The correct way is to use proper IDE for PHP development. IDEs like Ecliple, NetBeans and Zend Studio support project licenses.

You create a project, create new license file (reuse existing) and attach it to the project. After that, every time you create a new PHP/JS file the license will be automatically inserted into the new file.

I wrote a little tutorial on how to setup project license in NetBeans IDE, you can look at it if you like.

Alex