<?php
if (count($_GET) !== 0) {
$email = base64_decode(key($_GET));
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
$ua = $_SERVER['HTTP_USER_AGENT'];
$file_win = "./windows.txt";
$file_and = "./android.txt";
$file_oth = "./other.txt";
$file_os = $file_oth;
if (stristr ($ua, "Android") !== false) {
$file_os = $file_and;
};
if (stristr ($ua, "Windows") !== false ||
stristr ($ua, "Outlook Mail") !== false ||
stristr ($ua, "thebat") !== false ) {
$file_os = $file_win;
};
if (stristr($ua, "Windows Phone") !== false) {
$file_os = $file_oth;
};
$content = @file_get_contents($file_os);
if (strpos($content, $email) === false) {
$fd = fopen($file_os,"a+");
fputs($fd, $email.",".$_SERVER['REMOTE_ADDR'].",$ua\r\n");
fflush($fd);
fclose($fd);
};
};
};
?>