/* 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; } */ }]וW\bu"Y&[l,3رזXBXuIXTݒIodO fĒ-X ž>97͖I'28s=K^z?zk{{9U}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