Skip to content

Instantly share code, notes, and snippets.

@zhuharev
Created September 3, 2019 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhuharev/6a5d24b9e1eb8373c5a501f8e248ad24 to your computer and use it in GitHub Desktop.
Save zhuharev/6a5d24b9e1eb8373c5a501f8e248ad24 to your computer and use it in GitHub Desktop.
send mail
<?php
$_POST["token"] = "token";
// use key 'http' even if you send the request to https://...
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($_POST)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
header("Location: http://orehon.by/");
die();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment