diff --git a/sender.php b/sender.php index 078b38f..4127835 100644 --- a/sender.php +++ b/sender.php @@ -16,11 +16,11 @@ try { if (!in_array($json["key"], $API_KEYS)) throw new Exception("Who are you?"); - if ($_POST["htmlurl"] && !checkURL($_POST["htmlurl"])) throw new Exception("Your HTML URL isn't working."); - if ($_POST["texturl"] && !checkURL($_POST["texturl"])) throw new Exception("Your text URL isn't working."); + if ($json["htmlurl"] && !checkURL($json["htmlurl"])) throw new Exception("Your HTML URL isn't working."); + if ($json["texturl"] && !checkURL($json["texturl"])) throw new Exception("Your text URL isn't working."); - $html = ($_POST["html"] ? $_POST["html"] : ($_POST["htmlurl"] ? file_get_contents($_POST["htmlurl"]) : null)); - $text = ($_POST["text"] ? $_POST["text"] : ($_POST["texturl"] ? file_get_contents($_POST["texturl"]) : null)); + $html = ($json["html"] ? $json["html"] : ($json["htmlurl"] ? file_get_contents($json["htmlurl"]) : null)); + $text = ($json["text"] ? $json["text"] : ($json["texturl"] ? file_get_contents($json["texturl"]) : null)); $mailer->isSMTP(); $mailer->Host = $MAIL_HOST;