Vous n'êtes pas identifié.
la page p3.php ne s'affiche pas après return 1
voici le code
{
return 0;
}
$token = $out[1];
$array = Array(
"CSRFToken" => $token,
"idMessage" => '',
"submitMethod" => 'web',
"todo" => '',
"boxId" => 'sent',
'galleryItem' => '-1',
'msisdns' => $cible,
'emails' => '',
'emoticones' => ':)',
'message' => $message,
'file' => '@'.realpath(EMPTY_FILE)
);
curl_setopt($ch, CURLOPT_URL, "http://www.sfr.fr/web-messagerie/mc/envoyer-texto-mms/submit.do");
curl_setopt($ch, CURLOPT_COOKIEJAR, realpath(COOKIE_FILE));
curl_setopt($ch, CURLOPT_COOKIEFILE, realpath(COOKIE_FILE));
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS,$array);
$ret = curl_exec($ch);
preg_match("!\"CSRFToken\" value=\"([0-9]*)!",$ret,$out);
$token = $out[1];
//Confirmation
$array = Array(
"CSRFToken" => $token,
"idMessage" => '',
"submitMethod" => 'web',
"todo" => '',
"boxId" => 'sent',
'emoticones' => ':)',
'mms' => 'false',
'message' => $message
);
curl_setopt($ch, CURLOPT_URL, "http://www.sfr.fr/web-messagerie/mc/envoyer-texto-mms/confirm.do");
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS,$array);
$ret = curl_exec($ch);
curl_close($ch);
echo $_POST['$cible'];
echo $_POST['$ciblefin'];
if(strpos($ret,"Le Texto a été expédié avec succès !") === false) return 0;
else return 1;
if( $cible > $ciblefin ) header ('location: p3.php');
else header ('location: p4.php');
}
?>
</body>
</html>Hors ligne

Bonjour mafarette,
Un petit "bonjour" ou un "salut" est toujours plus agréable à lire quand on ouvre un poste. De même, l'utilisation de la balise code
permet justement de délimiter le code que vous postez ...
Sinon, ça donne quoi un echo de $cible et $ciblefin avant la ligne :
if(strpos($ret,"Le Texto a été expédié avec succès !") === false) return 0;
else return 1;Hors ligne
Propulsé par PunBB
© Copyright 2007
Forum créer un site