I have LaTeX code inside PHP (not as .tex file); for example received by $_POST. How can I save the rendered LaTeX as a PNG or PDF file on my server?
EDIT: I know that PHP normally does not do this. I will run a shell command within PHP. Thus, I need something to do so in Linux terminal.
you could exec() pdfTex to generate a PDF
URL: http://www.tug.org/applications/pdftex/
Run command
after you saved your tex-code from $_POST to a file using file_put_contents() – make sure you have the rights to write in the specified folder.
hope that helps!