$result = file_get_contents('http://example.com/script.php' . http_build_query([
'param1' => '1',
'param2' => '2',
'param3' => '3',
]));
$result = file_get_contents(
'http://example.com/script.php',
false,
stream_context_create(
[
'http' => [
'method' => 'POST',
'header' => 'Content-Type: multipart/form-data; boundary=' . $boundary,
'content' => $content,
]
]
)
);