How to use unix web twain scanning hardware devices?

Hi. I want to scanning images through webpage and using unix web twain scanning devices like scanner or digital cameras. I am building a web application and using twain interface to support scanning documents from twain hardware through webpage but it is not working for me. Actually an error occurs while scanning images and retrieving data as loading start. Any solution please.
