99) exit; $wp_load = str_repeat('../', $d) . 'wp-load.php'; require_once($wp_load); global $wpdb; // get all option names and options values from the WP Options table where the option name starts with "bfa_ata_" $atahualpa_options = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options WHERE option_name REGEXP '^bfa_ata_'"); // output the header $filename = 'atahualpa.options.' . str_replace("http://","",get_option('siteurl')) . "." . date('Y-m-d') . '.xml'; header('Content-Description: File Transfer'); header("Content-Disposition: attachment; filename=$filename"); header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true); // output the file echo '\n"; echo "\n"; // Loop through the database query that we got earlier foreach ($atahualpa_options as $atahualpa_option) { echo "<" . $atahualpa_option->option_name . ">\n"; echo htmlspecialchars($atahualpa_option->option_value); echo "\noption_name . ">\n"; } echo"\n"; ?>