How can i get the post’s full html source by its ID?

If you have the post’s ID, I assume that you are the owner of the blog ( Not because others can’t have the ID, but because only the owner should do such tasks ).

To convert the post ID to the post’s URL, you can use get_the_permalink():

$url = get_the_permalink( $id );

Afterward, you can use file_get_contents() to fetch its content, including the full source of that web page. So, your full code will be:

$url = get_the_permalink( $id );
$data = file_get_contents( $url );

Which data is your HTML source. Note that this will only work in the WordPress environment.