In this cenario, the application finishes before the post is done.
What I want to achieve is that before the application ends, the post on the page is done.
I want the log to be 1,2,3,4.
//criamos o arquivo
$msg = $_GET['msg'];
$myfile = fopen("log.txt", "a")...