You have mistaken the nature of this site. We tend to help programmers write code, not write code for people who don't want to try, or search the web for people who can't use google.
I made an exception in your case, typed your question in to google and found this
] within seconds. Clearly no-one is going to write this, just for you, and paste the code in here, so a link found with google is the only answer you could have hoped for. I wrote this: How to Use Google and Other Tips for Finding Programming Help
] just for people like you. Please read it.