Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(-1);
- ini_set('display_errors', 'On');
- function send($packet, $url, $post) {
- $ctx = stream_context_create(
- array(
- $post => array(
- 'header' => "Content-type: application/x-www-form-urlencoded",
- 'method' => 'POST',
- 'content' => $packet
- )
- )
- );
- return file_get_contents($url, 0, $ctx);
- }
- $postdata = http_build_query(
- array(
- 'email' => 'ivaylo@www-you.com',
- 'password' => '123456'
- )
- );
- var_dump(send($postdata, 'https://e-hub.eu/api/auth', 'https'));
- // string(0) ""
- die();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement