Skip to content

Instantly share code, notes, and snippets.

@cahva
Last active August 29, 2015 14:01
Show Gist options
  • Save cahva/ce1fd04896805b887902 to your computer and use it in GitHub Desktop.
Save cahva/ce1fd04896805b887902 to your computer and use it in GitHub Desktop.
eFiles external login form
<?php
$filerunUrl = 'https://efiles.fi';
$filerunLoginUrl = $filerunUrl.'/?action=login';
$redirectOnFailureUrl = 'http://localhost:8080/index.php?';
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Efiles login</title>
</head>
<body>
<?php
if (isset($_GET['feedback'])) {
echo base64_decode($_GET['feedback']);
}?>
<form method="post" action="<?=$filerunLoginUrl ?>">
<input type="hidden" name="redirectAfterLogin" value="<?php echo base64_encode($filerunUrl)?>">
<input type="hidden" name="redirectOnFailure" value="<?php echo base64_encode($redirectOnFailureUrl)?>">
<label for="usr">Username:</label>
<input type="text" name="username" value="" id="usr"/>
<label for="pass">Password:</label>
<input type="password" name="password" value="" id="pass" />
<input type="submit" value="Login">
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment