Also be aware that even though you can use this for-loop to find all instances of data types, you should still maintain a reference to those objects somewhere or the garbage collector will destroy them. You don't have to worry about that with the 'atomic' types (area, turf, obj, mob) because they are always at least referenced by world.contents and will therefore never go away without you explicitly deleting them.
The new form library (about to be released) works just about transparently in either web (CGI) or BYOND mode. It just requires a slightly different invocation and things like prompt buttons don't work on the web. You could use world.Export() to communicate between the CGI program and a running world. I can't wait to see what people dream up with this!