I use WordPress.
Get HTML output
Can I get the HTML output from a post or a page? I’ve read about using ob_get_contents
but it might be better if I could run it through a hook.
Title tag
In my case I want to get the title tag and some other meta data from the HTML output inside wp-admin. I thought of fetching it by using cURL
but that might slow down the workflow.
Question
What is the “correct” solution to this problem?
Use the built-in HTTP API: http://codex.wordpress.org/HTTP_API
Example:
$the_body
will contain the actual page content returned by the server.