I have not really understand the POST method
![Embarassed :oops:](./images/smilies/icon_redface.gif)
I have this php code
Code: Select all
function Ajoute($Texte)
{
$Ecriture = fopen("ListeTextes.txt", "a");
fputs($Ecriture, "\n" . $Texte);
fclose($Ecriture);
}
if (isset($_POST['Action']) && isset($_POST['Valeur']))
{
$Action = $_POST['Action'];
$Valeur = $_POST['Valeur'];
if ($Action == "Ajoute")
{
Ajoute($Valeur);
}
}
![Neutral :|](./images/smilies/icon_neutral.gif)
Code: Select all
Url$ = "http://Mysite/index.php"
InitNetwork()
HttpRequest = HTTPRequest(#PB_HTTP_Post, Url$, "Action=Ajoute&Valeur=hello")
If HttpRequest
Debug "Status: " + HTTPInfo(HTTPRequest, #PB_HTTP_StatusCode)
Debug "Réponse: " + HTTPInfo(HTTPRequest, #PB_HTTP_Response)
FinishHTTP(HTTPRequest)
Else
MessageRequester("Erreur", "La requete n'a pas été envoyée")
EndIf