Bonjour, il y a quelques mois, je vous avez demandé comment faire pour m'identifier sur un site internet à l'aide de sockets, Wims m'avait donné ce lien :http://www.scriptsdb.org/tutar.php?id=635 et j'avais réussi, le problème c'est que après quelques mois quand je veux m'en resservir, bah ça marche pu.
<div align="center">
<form name="connection" action="./ident.php" method="POST">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td><div align="center" title="Pseudo">
<input name="pseudo" type="text" onFocus="if (value == 'Votre pseudo') value ='';" onBlur="if (value == '') this.value = 'Votre pseudo';" value="Votre pseudo" size="18" maxlength="16">
</div></td>
</tr>
<tr>
<td><div align="center" title="Mot de passe">
<input name="password" type="password" onFocus="if (value == 'Password') this.value ='';" onBlur="if (value == '') this.value = 'Password';" value="Password" size="18" maxlength="16">
</div></td>
</tr>
<tr>
<td><div align="center">
<input type="submit" name="submit" value="Connexion">
</div></td>
</tr>
</table>
<div style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:9px"></div>
</form>
</div>
Voila, donc là je trouve les renseignements demandé à savoir :
method=post action=/ident.php
name=pseudo
name=password
name=submit value=Connexion
Mais quand je lance mon code ( le code ci dessous )
alias azop.login {
sockclose azop.login
sockopen azop.login bouzouks.net 80
}
on *:sockopen:azop.login:{
if (!$sockerr) {
var %azop.login = $+(pseudo=Corween,$chr(38),password=7845,$chr(38),connexion=submit)
sockwrite -n $sockname POST /ident.php HTTP/1.1
sockwrite -n $sockname Host: bouzouks.net
sockwrite -n $sockname Content-Type: application/x-www-form-urlencoded; charset="utf-8"
sockwrite -n $sockname Content-Length: $calc($len(%azop.login) +1)
sockwrite -n $sockname
sockwrite -n $sockname %azop.login
}
}
on *:sockread:azop.login:{
sockread %azop.temp
echo -a %azop.temp
}
Le message du serveur renvoyé est :
HTTP/1.1 301 Moved Permanently
Date: Mon, 08 Oct 2007 12:11:02 GMT
Server: Apache
Location: http://www.bouzouks.net/ident.php
Content-Length: 303
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.bouzouks.net/ident.php">here</a>.</p>
<hr>
<address>Apache Server at bouzouks.net Port 80</address>
</body></html>
Voila, donc si quelqu'un pouvait m'éclairer, ou me dire pourquoi ça ne marche, ce serait simpatique :)
Je vous remerci :)
PS : Désolé pour toutes ces couleurs qui font mal aux yeux mais tout en noir on s'y perd.
X`