如何使用php header函数发送http post请求,就像使用html表单一样

I want to send Important data to another site with post request in php and concurrent redirect to this site If I use html <form> for this issue, user can stop process and change data

in curl and other methods redirect to url is impossible.

I found this snipped code :

header("POST $path HTTP/1.1
" );
header("Host: $host
" );
header("Content-type: application/x-www-form-urlencoded; charset=UTF-8
" 
);
header("Content-length: " . strlen($data) . "
" );
header("Connection: close

" );
header($data);

But when run this code, give me file for save like force download and post header not send

I cant use html <form> for this actionو Because user can change value of form fields

Hope my question is clear

Thank you