HEX
Server: Apache
System: Linux 162-240-236-42.bluehost.com 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
User: bt667 (1004)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /home/bt667/public_html/wp-content/plugins/wp_mvplayer/includes/csvfiledownload.php
<?php
include_once '../../../../wp-load.php';
if ( ! defined( 'ABSPATH' ) ) exit;

global $wpdb;
$users_table = $wpdb->prefix."mvplayer_users";
$result     = $wpdb->get_results("SELECT * FROM $users_table");
$content="";
$content.= "UserName,UserEmail,User IP Address,Created On \n";
$filename="userdata.csv";

foreach( $result as $data ){
    $content.=$data->UserName.",".$data->UserMail.",".$data->UserIPAddress.",".$data->Date;
    $content.="\n";
}

header("Content-type: text/csv");
header("Cache-Control: no-store, no-cache"); 
header("Content-Disposition: attachment; filename=".$filename);
header("Expires: 0");
header("Pragma: no-cache");
echo $content;
exit();