PHPのfile_get_contents()では通常GETでリクエストを送信しますが、POSTでリクエストを投げたい場合があります。
このような場合はfile_get_contents()の第3引数を使えば良いです。
<?php
$context = stream_context_create([
'http' => [
'method' => 'POST',
]
]);
$result = file_get_contents('https://example.com/foo', false, $context);
echo $result;
こちらもおススメ