• if I know the page_id or post_id of a post or a page,how to write a functon to get its html output(just the same as the source we viewed from https://blog/?p=post_id’s html code )?

    I just want to get the output directly from php, not from curl or http fopen or fsocksopen!

    who can help me, thank you!

Viewing 1 replies (of 1 total)
  • Thread Starter storyday

    (@storyday)

    and this code does not work, it will redirct admin page to post page

    $ori_dir = getcwd();
    chdir(ABSPATH);
    ob_start();
    include ABSPATH.'index.php';
    $contents = ob_get_clean();
    chdir( $ori_dir);

Viewing 1 replies (of 1 total)
  • The topic ‘how to get the html output’ is closed to new replies.