The first link on the google search I gave you had some good code. No-one will be able to give you 100% what you are looking for unless you can be 100% specific. I spend days/weeks researching stuff on google and end up stitching together various bits of code and thats why you see very few questions on here from me.
You could try hotscripts.com and look for a webmirror - There as one there years ago I used to use which was very good and handled pretty much everything including https. It's only downfall was it didn't get along with magic quotes but you can still hack the code out for your own tinkering.