Vous n'êtes pas identifié.

Annonce

#1 la page p3.php ne s'affiche pas après return 1 du 23-01-2010 14:42:15

mafarette
c00lnaute nouveau
Date d'inscription: 21-01-2010
Messages: 1

la page p3.php ne s'affiche pas après return 1

la page p3.php ne s'affiche pas après return 1

voici le code

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

 

23-01-2010 14:42:15

Mister $$$
Créer un site


#2 Re la page p3.php ne s'affiche pas après return 1 du 24-01-2010 10:37:41

c00lman
Administrateur
Date d'inscription: 16-08-2007
Messages: 1558
Site web

Re: la page p3.php ne s'affiche pas après return 1

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 http://forum.creer-un-site.fr/img/puntoolbar/smooth/bt_pre.png permet justement de délimiter le code que vous postez ...

Sinon, ça donne quoi un echo de $cible et $ciblefin avant la ligne :

Code:

if(strpos($ret,"Le Texto a &eacute;t&eacute; exp&eacute;di&eacute; avec succ&egrave;s&nbsp;!") === false) return 0;
    else return 1;

Hors ligne

 

Propulsé par PunBB
© Copyright 2007
Forum créer un site

Partenaires de « créer un site internet »

Flux Rss Remonter Remonter Fermer