E-mailing You Your Unique Information

[insert_php]

function curPageURL() {
$pageURL = ‘http’;
if ($_SERVER[“HTTPS”] == “on”) {$pageURL .= “s”;}
$pageURL .= “://”;
if ($_SERVER[“SERVER_PORT”] != “80”) {
$pageURL .= $_SERVER[“SERVER_NAME”].”:”.$_SERVER[“SERVER_PORT”].$_SERVER[“REQUEST_URI”];
} else {
$pageURL .= $_SERVER[“SERVER_NAME”].$_SERVER[“REQUEST_URI”];
}
return $pageURL;
}

function reverso($datie,$scrambler) {

$datiecode = $scrambler * $datie;

if ($datiecode== “1”) $datiecode = “01”;
if ($datiecode== “2”) $datiecode = “02”;
if ($datiecode== “3”) $datiecode = “03”;
if ($datiecode== “4”) $datiecode = “04”;
if ($datiecode== “5”) $datiecode = “05”;
if ($datiecode== “6”) $datiecode = “06”;
if ($datiecode== “7”) $datiecode = “07”;
if ($datiecode== “8”) $datiecode = “08”;
if ($datiecode== “9”) $datiecode = “09”;

$rem = 0;
$rev = 0;
while ($datiecode>1) {
$rem = $datiecode%10;
$rev = ($rev *10) + $rem;
$datiecode = $datiecode/10;
}

if ($datie== “01”) $rev = 10 * $scrambler;
if ($datie== “02”) $rev = 20 * $scrambler;
if ($datie== “03”) $rev = 30 * $scrambler;
if ($datie== “04”) $rev = 40 * $scrambler;
if ($datie== “05”) $rev = 50 * $scrambler;
if ($datie== “06”) $rev = 60 * $scrambler;
if ($datie== “07”) $rev = 70 * $scrambler;
if ($datie== “08”) $rev = 80 * $scrambler;
if ($datie== “09”) $rev = 90 * $scrambler;

return $rev;
}

function numberformat($datiecode) {

if ($datiecode== “1”) $datiecode = “01”;
if ($datiecode== “2”) $datiecode = “02”;
if ($datiecode== “3”) $datiecode = “03”;
if ($datiecode== “4”) $datiecode = “04”;
if ($datiecode== “5”) $datiecode = “05”;
if ($datiecode== “6”) $datiecode = “06”;
if ($datiecode== “7”) $datiecode = “07”;
if ($datiecode== “8”) $datiecode = “08”;
if ($datiecode== “9”) $datiecode = “09”;

$newnumero = $datiecode;

return $newnumero;

}

// Function to validate against any email injection attempts

function IsInjected($str)
{
$injections = array(‘(\n+)’,
‘(\r+)’,
‘(\t+)’,
‘(%0A+)’,
‘(%0D+)’,
‘(%08+)’,
‘(%09+)’
);
$inject = join(‘|’, $injections);
$inject = “/$inject/i”;
if(preg_match($inject,$str))
{
return true;
}
else
{
return false;
}
}

function righttoleft($valuta) {
$str_out[0] = “”;
if ($valuta==””) return $valuta;
else {
$num_out = $valuta;
for($i=0; $i < strlen($num_out); $i+=2) { $num_in = intval(substr($num_out,$i,2)) + 23; $tempcoder = strval(dechex($num_in)); $tempcoder16 = '%'.$tempcoder; $num_in = urldecode($tempcoder16); $str_out[$i] = $num_in; } $str_output=""; for($j=0; $j < strlen($num_out); $j+=2) { $str_output = $str_output.$str_out[$j]; } return $str_output; } } $sendemail = "0"; $tempmyurl = curPageURL(); $myurl = urldecode($tempmyurl); $myurllengtho = strlen($myurl); $starto = strpos($myurl,"*") + 1; $lengtho = strlen($myurl); $toturl = substr($myurl,$starto,$myurllengtho-$starto); $lovenet = explode("&",$toturl); $emailcodo = substr($lovenet[0],3); $category = substr($lovenet[1],3); if ($emailcodo == "") $emailcodo = "83888478418388847823768886"; if ($emailcodo != "83888478418388847823768886") $sendemail = "1"; if ($emailcodo == "83888478418388847823768886") $sendemail = "0"; $emailtemp = righttoleft($emailcodo); $to_email = urldecode($emailtemp); if ($to_email != "joke@joke.com") $sendemail = "1"; $monthcode = array("Z","a","b","c","d","e","f","g","h","i","j","k","l"); $suffixcode = array("Z","w","w","w","w","x","x","x","x","y","y","y","y","z","z","z","z"); date_default_timezone_set('America/New_York'); $montho = date("m"); //01-12 $dato = date("d"); //01-31 $yearo = date("Y"); //2017 $yearsmall = date("y"); //17 $timo = date("H:i:s"); // 01:05:21 $todaysdate = $yearo."-".$montho."-".$dato." ".$timo; $expdatenumber = 14; //code expires 14 days from today's date $dayadd = "P".$expdatenumber."D"; $expirationdate = new DateTime($todaysdate); $expirationdate->add(new DateInterval($dayadd));

$expirationstring = $expirationdate->format(“Y-m-d H:i:s”);

$expmonthnumber = $expirationdate->format(“m”);
$expmonthname = $expirationdate->format(“F”);
$expdaynumber = $expirationdate->format(“d”);
$expyearnumber = $expirationdate->format(“Y”);
$expyearsmall = $expirationdate->format(“y”);

$codeyear = reverso($expyearsmall,1);
$codemonth = $monthcode[$expmonthnumber*1];
$codeday = numberformat(reverso($expdaynumber,2));
$codesuffix = $suffixcode[$expmonthnumber*1];

$expirationtext = $expmonthname.” “.$expdaynumber.”, “.$expyearnumber;
$promocode = “in”.$codeyear.”-“.$codemonth.$codeday.$codesuffix;

$specialreportlink = “http://www.lifeshieldlaser.com/wp-content/uploads/lifeshieldspecialreport.html?*EM=”.$to_email;
$subject = “Your Lifeshield Laser discount code and special report”;
$visitor_email = “office@lifeshieldlaser.com”;
$domaino = “http://www.lifeshieldlaser.com/”;
$contactlinko = “contact/”;
$namo = “Gene Lennarts”;
$redirecturl = “http://www.lifeshieldlaser.com/specialsent/”;

///————Do Validations————-

if ($sendemail==”1″) {

$ip = isset($_SERVER[‘REMOTE_ADDR’]) ? $_SERVER[‘REMOTE_ADDR’] : ”;

$to = filter_var($to_email,FILTER_SANITIZE_EMAIL);
$subjecto = $subject;
$from = $visitor_email;
$ip = isset($_SERVER[‘REMOTE_ADDR’]) ? $_SERVER[‘REMOTE_ADDR’] : ”;

if ($category==”golf”) {

$golflink = “http://www.lifeshieldlaser.com/wp-content/uploads/video-sports.html?*EM=”.$to_email;

$message = ““.$subjecto.”

Thanks for subscribing to our 6-part email series which will describe, in simple terms, the LifeShield Laser for you. Please go to the following link immediately and download the special report:

Click here

To whet your appetite for what the laser can do for your golf game, click here.

Also included herein is a special $50 discount code. This will get you $50 off a LifeShield Laser purchase
if you purchase one before “.$expirationtext.”. You can make up your mind after you finish
reading the six different e-mails we’ll send you.

Please type “.$promocode.” in the promotion code field when placing your order to avail yourself
of this $50 discount.

Save this e-mail! We will not send out this discount code to you again.

Sincerely,

THE LIFESHIELD LASER TEAM

P.S.: Do not respond to this e-mail. Instead, visit the contact form on our web site.

“;

}

$headers = “MIME-Version: 1.0″.”\r\n”;
$headers .= “Content-type: text/html; charset=iso-8859-1″.”\r\n”;
$headers .= “From: “.$namo.” < ".$visitor_email.">\r\n”;
$headers .= “To: Lifeshield Subscriber < ".$to_email.">\r\n”;
$headers .= “Reply-To: $visitor_email\r\n”;

mail($to,$subjecto,$message,$headers);

$url1 = ““;

printf($url1);

}

if ($sendemail==”0”) {

echo “

No valid e-mail address was specified. No discount code or special report has been sent.

“;

}

[/insert_php]

Comments are closed.