What we need installed:
Latex + dvips/dvipdf + convert. Convert should be installed, so the host only needs to install latex and dvips/dvipdf.
latex --interaction=nonstopmode my.tex
dvips -E my.dvi -o my.ps
convert -density 120 my.ps my.png
//then comes some code that deletes temporarily files.
But there's also an alternative way:
1. Create an account on a forum that has latex support.
2. Create a c++-script. When someone wants to post latex-code in this forum that c++-script will log in to the other forum, entering "new topic", pasting in the latex code and "pressing" the preview-button. This will generate a picture (with the latex code). The just copy the image location and paste it in the textfield here at cpp-home. You will not even have to save the images here at cpp-home!