1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
| {
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> |
Partager