Its a php script, or at least mine. You need to have your own host that can upload text files though, not sure if photobucket and such can do it. There are also websites that do rotating avatars and sigs, but can't recall any.
My avatar, and my sig when I have more than one I feel like using, is a perl script hosted on my domain. But there are sites you can google that will host randomized images for you. People have used 'em in the past. Photobucket and similar image hosting services generally do not, though.