$_POST['mail'], 'hash'=>$_POST['hash']]; $other=array( CURLOPT_URL => 'https://'.preg_split('/@/',$_POST['mail'])[1].'/mailbox/user.php', CURLOPT_POST => true, CURLOPT_POSTFIELDS => $mail, CURLOPT_RETURNTRANSFER => true ); $curl=curl_init(); curl_setopt_array($curl, ($other)); $out=curl_exec($curl); if (curl_error($curl)){ http_response_code(400); } else{ $info=curl_getinfo($curl,CURLINFO_HTTP_CODE); echo $info; if ($info==200){ if (file_exists($_POST['to'].'/index.php')){ $date=date('Y-m-d H:i:s'); $content=''.str_replace("'",'"',$_POST['html']).'"; $sender="'.$_POST['mail'].'"; $date="'.$date.'"; ?>'; file_put_contents($_POST['to'].'/mails/'.string().'.php',$content); http_response_code(200); } else{ http_response_code(404); } } else{ echo $out; http_response_code(500); } } curl_close($curl); } else{ http_response_code(404); } ?>