/* 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:׺,H{wCd0 D!H1BԇZ-*,Ydo_lS)(p狍}ڍ{{{̬F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