If I have a .php file with dynamic content, how would I go about generating the html the browser sees, but outside of the browser? I.e. via the command line?
You can use cURL
from the command line to send Http requests.
For example: curl http://localhost:8080/index.php