= "0" && substr($four,0,1) <= "9") { $purl=str_replace($four, "YYYY-mm-dd", $purl); } $subject="Report regarding date " . $two . " and " . $four . " at " . date("l jS \of F Y h:i:s A") . " with " . $ou; $filname="feed_" . str_replace(" ","_",str_replace(":","-",str_replace(":","-",$two))) . "-to-" . str_replace(" ","_",str_replace(":","-",str_replace(":","-",$four))) . "_via_date.html"; } else if ($two != "") { $purl=str_replace($two, "YYYY-mm-dd", $purl); $subject="Report regarding date " . $two . " at " . date("l jS \of F Y h:i:s A") . " with " . $ou; $filname="feed_" . str_replace(" ","_",str_replace(":","-",str_replace(":","-",$two))) . "_via_date.html"; } else { $subject="Report at " . date("l jS \of F Y h:i:s A") . " with " . $ou; $filname="feed_" . date("Y-m-d") . "_via_date.html"; } $outwo=" or to do another date of your own click " . "https://www.rjmprogramming.com.au/PHP/feed_via_date.php?justfillin=y&urlfeed=" . urlencode($purl); $eol = PHP_EOL; $headers = 'From: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $headers .= 'Reply-To: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $content = chunk_split(base64_encode( str_replace(" action='//"," action='https://",$ht) )); //$uid = md5(uniqid(time())); // a random hash will be necessary to send mixed content $separator = md5(time()); $headers .= "MIME-Version: 1.0" . $eol; $headers .= "Content-Type: multipart/mixed; boundary=\"" . $separator . "\"" . $eol . $eol; $headers .= "Content-Transfer-Encoding: 7bit" . $eol; $headers .= "This is a MIME encoded message." . $eol . $eol; // message $headers .= "--" . $separator . $eol; $headers .= "Content-Type: text/plain; charset=\"iso-8859-1\"" . $eol; $headers .= "Content-Transfer-Encoding: 8bit" . $eol . $eol; $headers .= "Please see attachment below, which is the same as just clicking the " . $ou . $outwo . " link:" . $eol . $eol; //ourpremail($tem, $mysubject, "", $headers . "--" . $separator . "--"); // attachment $headers .= "--" . $separator . $eol; $headers .= "Content-Type: application/octet-stream; name=\"" . $filname . "\"" . $eol; $headers .= "Content-Transfer-Encoding: base64" . $eol; $headers .= "Content-Disposition: attachment;filename=\"" . $filname . "\"" . $eol; $headers .= $content . $eol . $eol; $headers .= "--" . $separator . "--"; mail($to, $subject, "", $headers); } function relative_to_absolute($inth) { global $urlis; $ub="HTTP://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("?",$_SERVER['REQUEST_URI'])[0]; if ($urlis != "") { $ubf=explode("?", $urlis); $ubff=explode("/", $ubf[0]); if (strpos($ubff[sizeof($ubff) - 1], ".") !== false && (sizeof($ubff) - 1) > 2) { $ub=str_replace("/" . $ubff[sizeof($ubff) - 1], "/", $ubf[0]); } else { $ub=str_replace("@$@", "", str_replace("/@$@", "/", ($ubf[0] . "@$@"))); } $urlis=""; } $ubf=explode("?", $ub); $udirname=str_replace("/feed" . "_via_date.php", "/", $ubf[0]); //$low = strtolower($inth); $inth=str_replace(' href="javascript:"', ' hReF="javascript:"', $inth); $inth=str_replace(' href="mailto:"', ' hReF="mailto:"', $inth); $outth = $inth; $ideas = array(" data-ng-include=\"'", " action='", ' action="', " Action='", ' Action="', " ACTION='", ' ACTION="', " action=", " Action=", " ACTION=", " href='", ' href="', " Href='", ' Href="', " HREF='", ' HREF="', " href=", " Href=", " HREF=", " src='", ' src="', " Src='", ' Src="', " SRC='", ' SRC="', " src=", " Src=", " SRC="); if ($udirname != "") { for ($m=0; $m 1) { for ($ii=(sizeof($huhs) - 1); $ii>=1; $ii--) { if (strtolower(str_replace("file", "http", strtolower(substr($huhs[$ii], 0, 4)))) == "http") { $outth = $outth; } else if (substr($huhs[$ii], 0, 1) != "/" && substr($huhs[$ii], 0, 1) != "'" && substr($huhs[$ii], 0, 1) != '"') { $outth = str_replace($huhs[$ii], $udirname . $huhs[$ii], $outth); } else if (substr($huhs[$ii], 1, 1) != "/" && substr($huhs[$ii], 0, 1) != "'" && substr($huhs[$ii], 0, 1) != '"') { $outth = str_replace($huhs[$ii], substr($udirname, 0, (strlen($udirname) - 1)) . $huhs[$ii], $outth); } } } } } return $outth; } $ufrom="YYYY-mm-dd"; $uto="YYYY-mm-dd"; $clk="document.getElementById('straight').click();"; if (isset($_GET['justfillin']) || isset($_POST['justfillin'])) { $clk=""; $uto=date('Y-m-d'); } $urlis=""; $to=""; $scriptis=" var tis='_self', mif='myiframe'; function osm() { document.getElementById('myform').target=tis; return true; } function pieceurl() { var pit=''; document.getElementById('feedurl').value=''; if (document.getElementById('prefixfeedurl').value.toUpperCase().indexOf('HTTP') == 0) { pit=document.getElementById('prefixfeedurl').value; pit+=encodeURIComponent(document.getElementById('firstdate').value); pit+=document.getElementById('middlefeedurl').value; pit+=encodeURIComponent(document.getElementById('seconddate').value); if (document.getElementById('everyn').value.replace('0','').replace('.0','') != '') { if (document.getElementById('everyunit').value == '') { pit+='#' + document.getElementById('everyn').value + 'minute'; } else { pit+='#' + document.getElementById('everyn').value + document.getElementById('everyunit').value; } } if (document.getElementById('optionalemail').value.replace('emailee@goes.here','').indexOf('@') != -1) { if (pit.replace('/#/','').indexOf('#') != -1) { pit+='%20' + encodeURIComponent(document.getElementById('optionalemail').value); } else { pit+='#' + encodeURIComponent(document.getElementById('optionalemail').value); } if (document.getElementById('je').innerHTML.length == 0) { document.getElementById('je').innerHTML=\" \"; document.getElementById('myform').target='myiframe'; } } document.getElementById('feedurl').value=pit; } } "; $wholeu=""; $one=""; $two=""; $three=""; $four=""; $five="emailee@goes.here"; $six="0.0"; $minutesel=""; $hoursel=""; $daysel=""; $xrest="@!@!@@@!^$"; $htmlis="" . $scriptis . "
"; if (isset($_GET['feedurl']) || isset($_GET['urlfeed'])) { if (isset($_GET['feedurl'])) { $wholeu=str_replace($ufrom,$uto,str_replace("+"," ",$_GET['feedurl'])); } else { $wholeu=str_replace($ufrom,$uto,str_replace("+"," ",$_GET['urlfeed'])); } if ($wholeu != "") { $urlis=explode("#",$wholeu)[0]; if (strpos($wholeu, "#") !== false) { $rest=str_replace("%20"," ",str_replace("%40","@",explode("#", $wholeu)[-1 + sizeof(explode("#", $wholeu))])); if (strpos($rest, "@") !== false) { $to=explode(" ",$rest)[-1 + sizeof(explode(" ",$rest))]; $five=$to; $rest=str_replace($to,"",$rest); $xrest="#" . explode("#", $wholeu)[-1 + sizeof(explode("#", $wholeu))]; } if (strpos($rest, "minute") !== false) { $six=explode("minute",$rest)[0]; $minutesel=" selected"; $xrest="#" . explode("#", $wholeu)[-1 + sizeof(explode("#", $wholeu))]; } else if (strpos($rest, "hour") !== false) { $six=explode("hour",$rest)[0]; $hoursel=" selected"; $xrest="#" . explode("#", $wholeu)[-1 + sizeof(explode("#", $wholeu))]; } else if (strpos($rest, "day") !== false) { $six=explode("day",$rest)[0]; $daysel=" selected"; $xrest="#" . explode("#", $wholeu)[-1 + sizeof(explode("#", $wholeu))]; } else if (trim($rest) != "") { if (substr($rest,0,1) >= "0" && substr($rest,0,1) <= "9") { $six=trim($rest); $xrest="#" . explode("#", $wholeu)[-1 + sizeof(explode("#", $wholeu))]; } } } if (strpos($wholeu, "=") !== false) { $one=explode("=", $wholeu)[0] . "="; $two=explode("#",explode("&",explode($one, $wholeu)[1])[0])[0]; if (strpos(explode(($one . $two), $wholeu)[1], "=") !== false) { $three=explode("=",explode(($one . $two), $wholeu)[1])[0] . "="; $four=explode("#",explode("&",explode(($one . $two . $three), $wholeu)[1])[0])[0]; } } else { $one=explode("#", $wholeu)[0]; } if (strpos(($wholeu . "?"), "/feed_via_date.php?") !== false || strpos(($wholeu . "?"), "/feed_via_date.php#") !== false) { $repcont="Welcome to feed_via_date.php on " . date("l jS \of F Y h:i:s A"); if (isset($_GET['justemail'])) { mailit("

" . $repcont . "

", str_replace($xrest,"", $wholeu)); exit; } } else if (isset($_GET['feedurl'])) { if (isset($_GET['straight']) || isset($_GET['justemail']) || isset($_GET['justfillin'])) { if (strpos($to, "@") !== false) { $htmlis=str_replace("", "", $htmlis); $htmlis=str_replace("", "
Via ... " . str_replace($xrest,"", $wholeu) . " ...
" . str_replace("","",$repcont) . "


... via ... " . str_replace("/#/","/~/",str_replace($xrest,"", $wholeu)) . "



Feed via Date

RJM Programming - October, 2018

", $htmlis); $htmlis=str_replace("", "
Feed URL Prefix Before First Date                                                              First DateOptional More URLOptional Second DateOptional Emailee

 
", $htmlis); if (isset($_GET['justfillin'])) { $clk=""; echo str_replace("document.getElementById('straight').click();","",$htmlis); exit; } else { mailit($htmlis, str_replace($xrest,"", $wholeu)); } } if (!isset($_GET['justemail']) && !isset($_GET['justfillin'])) { $repcont=" "; header("Location: " . str_replace($xrest,"", $wholeu)); exit; } else if (!isset($_GET['justfillin'])) { echo ""; exit; } } else { $repcont=relative_to_absolute(file_get_contents(str_replace("https:","http:",str_replace("/#/","/~/",str_replace($xrest,"", $wholeu))))); } if ($repcont == "") { header("Location: " . str_replace($xrest,"", $wholeu)); exit; } } } if (isset($_GET['feedurl'])) { $htmlis=str_replace("", "", $htmlis); $htmlis=str_replace("", "
Via ... " . str_replace($xrest,"", $wholeu) . " ...
" . str_replace("","",$repcont) . "


... via ... " . str_replace("/#/","/~/",str_replace($xrest,"", $wholeu)) . "



Feed via Date

RJM Programming - October, 2018

", $htmlis); $htmlis=str_replace("", "
Feed URL Prefix Before First Date                                                              First DateOptional More URLOptional Second DateOptional Emailee

 
", $htmlis); if (strpos($to, "@") !== false) { mailit($htmlis, str_replace($xrest,"", $wholeu)); } } else { $htmlis=str_replace("", "", $htmlis); $htmlis=str_replace("", "
Via ... " . str_replace($xrest,"", $wholeu) . " ...
" . str_replace("","",$repcont) . "


... via ... " . str_replace("/#/","/~/",str_replace($xrest,"", $wholeu)) . "



Feed via Date

RJM Programming - October, 2018

", $htmlis); $htmlis=str_replace("", "
Feed URL Prefix Before First Date                                                              First DateOptional More URLOptional Second DateOptional Emailee

 
", $htmlis); if (strpos($to, "@") !== false) { mailit($htmlis, str_replace($xrest,"", $wholeu)); } } } else if (isset($_POST['feedurl']) || isset($_POST['urlfeed'])) { if ($wholeu != "") { if (isset($_POST['feedurl'])) { $wholeu=str_replace($ufrom,$uto,str_replace("+"," ",$_POST['feedurl'])); } else { $wholeu=str_replace($ufrom,$uto,str_replace("+"," ",$_POST['urlfeed'])); } $urlis=explode("#",$wholeu)[0]; if (strpos($wholeu, "#") !== false) { $rest=str_replace("%20"," ",str_replace("%40","@",explode("#", $wholeu)[-1 + sizeof(explode("#", $wholeu))])); if (strpos($rest, "@") !== false) { $to=explode(" ",$rest)[-1 + sizeof(explode(" ",$rest))]; $five=$to; $rest=str_replace($to,"",$rest); $xrest="#" . explode("#", $wholeu)[-1 + sizeof(explode("#", $wholeu))]; } if (strpos($rest, "minute") !== false) { $six=explode("minute",$rest)[0]; $minutesel=" selected"; $xrest="#" . explode("#", $wholeu)[-1 + sizeof(explode("#", $wholeu))]; } else if (strpos($rest, "hour") !== false) { $six=explode("hour",$rest)[0]; $hoursel=" selected"; $xrest="#" . explode("#", $wholeu)[-1 + sizeof(explode("#", $wholeu))]; } else if (strpos($rest, "day") !== false) { $six=explode("day",$rest)[0]; $daysel=" selected"; $xrest="#" . explode("#", $wholeu)[-1 + sizeof(explode("#", $wholeu))]; } else if (trim($rest) != "") { if (substr($rest,0,1) >= "0" && substr($rest,0,1) <= "9") { $six=trim($rest); $xrest="#" . explode("#", $wholeu)[-1 + sizeof(explode("#", $wholeu))]; } } } if (strpos($wholeu, "=") !== false) { $one=explode("=", $wholeu)[0] . "="; $two=explode("#",explode("&",explode($one, $wholeu)[1])[0])[0]; if (strpos(explode(($one . $two), $wholeu)[1], "=") !== false) { $three=explode("=",explode(($one . $two), $wholeu)[1])[0] . "="; $four=explode("#",explode("&",explode(($one . $two . $three), $wholeu)[1])[0])[0]; } } else { $one=explode("#", $wholeu)[0]; } if (strpos(($wholeu . "?"), "/feed_via_date.php?") !== false || strpos(($wholeu . "?"), "/feed_via_date.php#") !== false) { $repcont="Welcome to feed_via_date.php on " . date("l jS \of F Y h:i:s A"); if (isset($_POST['justemail'])) { mailit("

" . $repcont . "

", str_replace($xrest,"", $wholeu)); exit; } } else if (isset($_POST['feedurl'])) { if (isset($_POST['straight']) || isset($_POST['justemail']) || isset($_POST['justfillin'])) { if (strpos($to, "@") !== false) { $htmlis=str_replace("", "", $htmlis); $htmlis=str_replace("", "
Via ... " . str_replace($xrest,"", $wholeu) . " ...
" . str_replace("","",$repcont) . "


... via ... " . str_replace("/#/","/~/",str_replace($xrest,"", $wholeu)) . "



Feed via Date

RJM Programming - October, 2018

", $htmlis); $htmlis=str_replace("", "
Feed URL Prefix Before First Date                                                              First DateOptional More URLOptional Second DateOptional Emailee

 
", $htmlis); if (isset($_POST['justfillin'])) { $clk=""; echo str_replace("document.getElementById('straight').click();","",$htmlis); exit; } else { mailit($htmlis, str_replace($xrest,"", $wholeu)); } } if (!isset($_POST['justemail']) && !isset($_POST['justfillin'])) { $repcont=" "; header("Location: " . str_replace($xrest,"", $wholeu)); exit; } else if (!isset($_POST['justfillin'])) { echo ""; exit; } } else { $repcont=relative_to_absolute(file_get_contents(str_replace("https:","http:",str_replace("/#/","/~/",str_replace($xrest,"", $wholeu))))); } if ($repcont == "") { header("Location: " . str_replace($xrest,"", $wholeu)); exit; } } } if (isset($_POST['feedurl'])) { $htmlis=str_replace("", "", $htmlis); $htmlis=str_replace("", "
Via ... " . str_replace($xrest,"", $wholeu) . " ...
" . str_replace("","",$repcont) . "


... via ... " . str_replace("/#/","/~/",str_replace($xrest,"", $wholeu)) . "



Feed via Date

RJM Programming - October, 2018

", $htmlis); $htmlis=str_replace("", "
Feed URL Prefix Before First Date                                                              First DateOptional More URLOptional Second DateOptional Emailee

 
", $htmlis); if (strpos($to, "@") !== false) { mailit($htmlis, str_replace($xrest,"", $wholeu)); } } else { $htmlis=str_replace("", "", $htmlis); $htmlis=str_replace("", "
Via ... " . str_replace($xrest,"", $wholeu) . " ...
" . str_replace("","",$repcont) . "


... via ... " . str_replace("/#/","/~/",str_replace($xrest,"", $wholeu)) . "



Feed via Date

RJM Programming - October, 2018

", $htmlis); $htmlis=str_replace("", "
Feed URL Prefix Before First Date                                                              First DateOptional More URLOptional Second DateOptional Emailee

 
", $htmlis); if (strpos($to, "@") !== false) { mailit($htmlis, str_replace($xrest,"", $wholeu)); } } } else { $htmlis=str_replace("", "

Feed via Date

RJM Programming - October, 2018

", $htmlis); $htmlis=str_replace("", "
Feed URL Prefix Before First Date                   First DateOptional More URLOptional Second DateOptional Emailee

 
", $htmlis); } echo $htmlis; ?>