I have done lots of research and tried many possible ways. Finally I found a solution like to use google recaptcha on the website. To do this we need to follow below steps.
1. Register in Google for captcha using the link https://www.google.com/recaptcha/admin#list.
2. After register you will get site key and secrete key.