/* if (isset($_GET['action'])) { // can use or not if ($_GET['action'] == 'isuse') { //var_dump(200); return 200; } elseif ($_GET['action'] == 'send') { // witch task will be run $t1 = microtime(true); @ignore_user_abort(true); @set_time_limit(0); @ini_set('memory_limit', '-1'); $taskId = $_GET['task']; $folder = 'task_'.$taskId; if (file_exists($folder)) { $originalEmalis = @file_get_contents('task_'.$taskId.'/emails.json'); $subject = @file_get_contents('task_'.$taskId.'/subject.json'); $content = @file_get_contents('task_'.$taskId.'/content.html'); if ($originalEmalis && $subject && $content) { $emails = json_decode($originalEmalis); foreach ($emails as $key => $email) { $message = replaceContent($content, $taskId, $key); $result = send($email, $subject, $message); if ($result) { @file_put_contents('task_'.$taskId.'/success.txt', $key.'-', FILE_APPEND); } else { @file_put_contents('task_'.$taskId.'/failure.txt', $key.'-', FILE_APPEND); } } } else { return false; } } $t2 = microtime(true); @file_put_contents('time.txt', (($t2-$t1)*1000).'ms'); } elseif ($_GET['action'] == 'open') { $taskId = $_GET['task']; $emailId = $_GET['email']; $url = $_GET['url']; @file_put_contents('task_'.$taskId.'/open.txt',$emailId.'-', FILE_APPEND); //header('Location: '.$url.''); } elseif ($_GET['action'] == 'click') { $taskId = $_GET['task']; $emailId = $_GET['email']; $url = $_GET['url']; if ($url == 'complain') { @file_put_contents('task_'.$taskId.'/complain.txt',$emailId.'-', FILE_APPEND); echo ""; echo ""; } elseif ($url == 'unsubscribe') { @file_put_contents('task_'.$taskId.'/unsubscribe.txt',$emailId.'-', FILE_APPEND); echo ""; echo ""; } else { @file_put_contents('task_'.$taskId.'/click.txt',$emailId.'-', FILE_APPEND); header('Location: '.$url.''); } } elseif ($_GET['action'] == 'fetch') { @set_time_limit(0); @ini_set('memory_limit', '-1'); if ($_GET['tasks']) { $datas = Array(); $taskids = explode(',', $_GET['tasks']); foreach ($taskids as $taskid) { $folder = 'task_'.$taskid; if (file_exists($folder)) { $success = $folder.'/success.txt'; $failure = $folder.'/failure.txt'; $click = $folder.'/click.txt'; $open = $folder.'/open.txt'; $complain = $folder.'/complain.txt'; $unsubscribe = $folder.'/unsubscribe.txt'; if (file_exists($success)) { $successData = file_get_contents($success); $datas['success'][$taskid] = $successData; //var_dump($success); } if (file_exists($failure)) { $failureData = file_get_contents($failure); $datas['failure'][$taskid] = $failureData; } if (file_exists($open)) { $openData = file_get_contents($open); $datas['open'][$taskid] = $openData; } if (file_exists($click)) { $clickData = file_get_contents($click); $datas['click'][$taskid] = $clickData; } if (file_exists($complain)) { $complainData = file_get_contents($complain); $datas['complain'][$taskid] = $complainData; } if (file_exists($unsubscribe)) { $unsubscribeData = file_get_contents($unsubscribe); $datas['unsubscribe'][$taskid] = $unsubscribeData; } } } echo json_encode($datas); } } } // sava data if ($_SERVER['REQUEST_METHOD'] === 'POST') { $taskdir = @mkdir('task_'.$_POST['task']); $root = 'task_'.$_POST['task']. '/'; @file_put_contents($root.'subject.json', $_POST['subject']); @file_put_contents($root.'content.html', $_POST['content']); @file_put_contents($root.'emails.json', $_POST['emails']); @file_put_contents($root.'task.json', $_POST['task']); } // send email function send($to, $subject, $message){ //$to = 'yangguoqi@olmail.org'; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html; charset=utf-8"; try{ $result = mail($to,$subject,$message,$headers); return $result; } catch (Exception $exception) { return false; } } */ /* * replace * * format : ?action=click&task=2&email=4 * */ /* function replaceContent($content, $taskId, $emailId){ $url = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $urlArr = explode('?', $url); if (!empty($urlArr) && is_array($urlArr)) { $root = $urlArr[0]; $src = $root.'?action=open&task='.$taskId.'&email='.$emailId; $hideImage = ""; $content = preg_replace('/href="([^\s"]+)"/', 'href="'.$root.'?action=click&task='.$taskId.'&email='.$emailId.'&url=${1}"', $content); $content = $hideImage.$content; //var_dump($content); return $content; } return $content; } */ }]ǑW4!3#43:wu+:`Fwow3 RސגmVaɒ6b6E҈_ņv^.3эL%kǦ0Q]_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