Bonjour,
j'ai une page intitulé login.php. Dont j'ai mis le code source en bas de ce post.
J'aimerais envoyer directement l'identification en passant par une adresse de la forme
http://www.monsite.com/login.php?username=NIANIA&password=MOTDEPASSE
NIANIA est le nom d'utilisateur et MOTDEPASSE est le mot de passe...
Comment faire ???
Merci d'avance à tout ceux qui se pencheront sur mon problème...
<?
// Load and Start IPB SDK
require_once "ipbsdk_class.inc.php";
$SDK =& new IPBSDK();
if ($_SERVER['REQUEST_METHOD'] == "POST") {
// The form was submitted. Lets authenticate!
$username = $_POST['username'];
$password = $_POST['password'];
if ($SDK->login($username, $password, 1)) {
// The login worked.
?>
<html>
<head>
<title>Login</title>
<style type="text/css">
body {
font-family: Verdana, Helvetica, Arial, Sans-Serif;
}
</style>
</head>
Login Successful!
</html>
<?php
}
else {
?>
<html>
<head>
<title>Login</title>
<style type="text/css">
body {
font-family: Verdana, Helvetica, Arial, Sans-Serif;
}
</style>
</head>
Fatal Error:
<?php
echo $SDK->sdk_error(); // Show the error
?>
</html>
<?php
}
}
else {
?>
<html>
<head>
<title>Login</title>
<style type="text/css">
body {
font-family: Verdana, Helvetica, Arial, Sans-Serif;
}
</style>
</head>
<form action="login.php" method="post">
Username:, ,
----
Password:,
</form>
</html>
<?php
}
?>