Mailinglisten-Archive |
>> Klappt soweit ganz gut, aber anscheinend verschluckt das base64_encode
>> /decode die + Zeichen.
> Nein, dies wäre dokumentiert.
>
> Wenn du deinen Code postest, könnte hier evtl. jemand helfen.
>
> Gruß, Hans
Hallo Hans,
So sieht er aus
// Datenpaket hinzufügen
$data = json_encode($data);
$iv = crypter::getIV();
$data = crypter::encrypt($data, $this->key, $iv);
$iv = base64_encode($iv);
$data = base64_encode($data);
$poststring .= "&iv=".$iv;
$poststring .= "&data=".$data;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $host.$path);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_FAILONERROR, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $poststring);
$d = curl_exec($ch);
curl_close($ch);
echo $host.$path.$poststring."<br><br>";
$iv = base64_decode($iv);
$d = base64_decode($d);
$d = crypter::decrypt($d, $this->key, $iv);
$d = json_decode($d,true);
wenn ich die URL eingebe sind die "+" weg
php::bar PHP Wiki - Listenarchive