[ 'header' => 'Content-type: application/x-www-form-urlencoded\r\n', 'method' => 'POST', 'content' => $data, ], ]; $context = stream_context_create($options); $result = file_get_contents($url, false, $context); if ($result === FALSE) { die('Error submitting form.'); } header('Location: /thank-you.html'); exit(); } ?>