This is a bit tricky.
Better use a asp script
this one works it just needs a little tweaking.
if you can't get this to work there are tons of scripts to find using google.
This is my junk I'm gona eat it