Created
July 2, 2020 14:03
-
-
Save chernysh2909/b4d9f1cb72b71aadc93c62469f4b4132 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function curlPost($url, array $params){ | |
$result = file_get_contents($url, false, stream_context_create(array( | |
'http' => array( | |
'method' => 'POST', | |
'header' => 'Content-type: application/x-www-form-urlencoded', | |
'content' => http_build_query($params) | |
) | |
))); | |
return $result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment