Check out the copyright-header RubyGem. It supports files with extensions ending in php, c, h, cpp, hpp, hh, rb, css, js, html. It can also add and remove headers.
Install it by typing "sudo gem install copyright-header"
After that, can do something like:
copyright-header --license GPL3 \
--add-path lib/ \
--copyright-holder 'Dude1 ' \
--copyright-holder 'Dude2 ' \
--copyright-software 'Super Duper' \
--copyright-software-description "A program that makes life easier" \
--copyright-year 2012 \
--copyright-year 2012 \
--word-wrap 80 --output-dir ./
It also supports custom license files using the --license-file argument.