From 64f9ee89e6450ee422f8338fae33ae489432c8ef Mon Sep 17 00:00:00 2001 From: noobskylimit <57034264+noobskylimit@users.noreply.github.com> Date: Tue, 20 Oct 2020 15:00:23 +0700 Subject: [PATCH] Update run.php --- run.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/run.php b/run.php index 993da95..77a145f 100644 --- a/run.php +++ b/run.php @@ -75,6 +75,32 @@ function register($phone_number, $fullname, $email, $otp, $reff){ $result = curl_exec($ch); return $result; } +function inbox($email) { + + $method = 'GET'; + + $endpoint = 'https://api.internal.temp-mail.io/api/v2/email/'.str_replace('%40', '@', $email).'/messages'; + + $inbox = $this->request ($method, $endpoint, $param=null, $header=null); + + $json = json_decode($inbox); + + foreach ($json as $json) { + + if(isset($json->body_text)) { + if(is_numeric(strpos($json->from, 'no-reply@blibli.com'))) { + $a = stripos($json->body_text, 'WELCOMEEMAILSERIES', 1000); + $b = strpos($json->body_text, 'Kalau kamu tidak'); + $activation_link = substr($json->body_text, ($a+21), (strlen($json->body_text)-$b+4)*-1); + return $activation_link; + } else { + return FALSE; + } + } else { + return FALSE; + } + } + } function nama(){ $ch = curl_init();