with all due respect, from the Apache Web Server forum charter:
It is not appropriate to expect other members to write your code for you or to debug your entire project; Please don't expect other members to solve a problem you don't want to begin solving yourself.
between lucy24's post and mine you have everything you need to give it a shot on your own.
try some code and post your results.
if you need more help, post the code you tried as well.