Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = "abc"; //$_POST['user'];
- $password = "abc"; //$_POST['pass'];
- if (isset($username, $password)) {
- $params = array('grant_type' => 'password', 'username' => $username, 'password' => $password);
- $query = http_build_query($params);
- $contextData = array(
- 'method' => 'POST',
- 'header' => "Content-Type: application/x-www-form-urlencoded\r\n",
- 'content' => $query
- );
- $context = stream_context_create(array('http' => $contextData));
- $result = file_get_contents(
- "https://mitglieder.leo-clubs.de/LeoAPI/api/memberlogin", // page url
- false,
- $context);
- echo 'requested';
- var_dump($result);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement