HEX
Server: Apache
System: Linux p3plzcpnl504659.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: iw4ko36aaxmu (10794665)
PHP: 8.3.27
Disabled: NONE
Upload Files
File: /home/iw4ko36aaxmu/public_html/upload.php
<?php
 

   if(isset($_FILES['uploaded'])){
$fileatt = $_FILES['uploaded']['tmp_name']; // Path to the file
      $fileatt_type=$_FILES['uploaded']['type'];

//$fileatt_type = "application/octet-stream"; // File Type
$fileatt_name = $_FILES['uploaded']['name']; // Filename that will be used for the file as the attachment

$email_from = "sales@chandlee.com"; // Who the email is from
$email_subject = "Hello"; // The Subject of the email
$email_txt = "This is testing message"; // Message that the email has in it

$email_to = "vivekvinayak87@gmail.com"; // Who the email is too

$headers = "From: ".$email_from;

$file = fopen($fileatt,'rb');
$data = fread($file,filesize($fileatt));
fclose($file);

$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";


$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: multipart/mixed;\n; charset=iso-8859-1' . "\r\n";
$headers .= "From: ".$email_from."\r\n";
$headers .= "Reply-to: ".$email_from."\r\n";

 

$email_message .= '<html><body>';
			$email_message .= "<table cellpadding=4 align=center width=70% bordercolor=#ccc border=1>";
			$email_message .= "<tr><td align=center colspan=2><img src='' /></td></tr>";
			$email_message .= "<tr><td align=center colspan=2 bgcolor=#FFFFCC height=50px>
			<strong> Employee DAILY REPORT STATUS</strong></td></tr>";
			$email_message .= "<tr><td align=right><strong>Employee Login ID:</strong> </td><td>" .$empid . "</td></tr>";
			$email_message .= "<tr><td align=right><strong>Password :</strong> </td><td>" . $randompass . "</td></tr>";
			$email_message .= "<tr><td align=right><strong>Employee Name :</strong> </td><td>" .$fullname . "</td></tr>";
			$email_message .= "<tr><td align=right><strong>Pupils Name :</strong> </td><td>" .$pname . "</td></tr>";
			$email_message .= "<tr><td align=right><strong>Address :</strong> </td><td>" .$address . "</td></tr>";
			$email_message .= "<tr><td align=right><strong>Email ID. :</strong> </td><td>" .$email . "</td></tr>";
			$email_message .= "<tr><td align=right><strong>Mobile No. :</strong> </td><td>" .$mobile . "</td></tr>";
			$email_message .= "<tr><td align=right><strong>D.O.B. :</strong> </td><td>" .$dob . "</td></tr>";
			$email_message .= "<tr><td align=right><strong>Gender :</strong> </td><td>" .$gender . "</td></tr>";
		//	$message .= "<tr><td align=right><strong>Employee Department :</strong> </td><td>" .$department . "</td></tr>";
			
			$email_message .= "</table><br /><br />";
			$email_message .= '</body></html>';
$email_message .= "This is a multi-part message in MIME format.\n\n" .
"--{$mime_boundary}\n" .
"Content-Type:text/html; charset=\"iso-8859-1\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" .
$email_message . "\n\n";

$data = chunk_split(base64_encode($data));

$email_message .= "--{$mime_boundary}\n" .
"Content-Type: {$fileatt_type};\n" .
" name=\"{$fileatt_name}\"\n" .
//"Content-Disposition: attachment;\n" .
//" filename=\"{$fileatt_name}\"\n" .
"Content-Transfer-Encoding: base64\n\n" .
$data . "\n\n" .
"--{$mime_boundary}--\n";

$ok = @mail($email_to, $email_subject, $email_message, $headers);

if($ok) {
echo "<font face=verdana size=2>The file was successfully sent!</font>";
} else {
die("Sorry but the email could not be sent. Please go back and try again!");
}


   }
?>









<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form method="post" enctype="multipart/form-data"  >
File Name: <input type="file" name="uploaded"  />
<input type="submit" value="submit"  />
</form>
</body>
</html>