EMAIL_FROM,"to" => CONTROL_MAIL, "subject" => "Get ADS Bakekka server: " . $_SERVER['SERVER_NAME'], "body" => " From IP: " . $_SERVER['REMOTE_ADDR'] ); if(! defined("NO_MAIL_DEVELOPMENT")) { $mailer->send( $maildata); }else { // print_r($maildata); } if (!isset($_SERVER['PHP_AUTH_USER'])) { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized'); echo 'Text to send if user hits Cancel button'; exit; } else { # echo "

Hello {$_SERVER['PHP_AUTH_USER']}.

"; # echo "

You entered {$_SERVER['PHP_AUTH_PW']} as your password.

"; if ( $_SERVER['PHP_AUTH_USER'] =="bakekka" && $_SERVER['PHP_AUTH_PW'] =="bakekka" ) { $auth=1; } else { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized'); echo ' password o utente sbaglaiti'; exit; } } if ($auth ) { $tempo=$_GET['time']; $datefile=date("Ymd"); $datefile=date("Ymd",time()-86400); if ( $tempo ) $datefile=date("Ymd",$tempo); else $datefile=date("Ymd",time()-86400); $fnamecsv="bakeca_feed_" . $datefile . ".xml"; $file = $sitebase."/frontend20/www/rss/_bakeca/". $fnamecsv; # $file="http://www.adboom.it/rss/_bakeca/".$fnamecsv; # $fp= fopen( $file,'rb' ); if ( file_exists($file ) ) { $content=file_get_contents( $file ) ."";; # @fclose($fp); } else { $content=' ' .""; } # print "\n
FILE: ". $file; # print "\n
Content: ".$content; # exit; # header ( "Content-type: application/xml" ); header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Cache-control: private"); header('Pragma: no-cache'); // HTTP/1.0 # header('Content-Disposition: attachment; filename=bakeca_feed.xml') ; header("Content-Disposition: attachment; filename=$fnamecsv"); header("Content-Transfer-Encoding: binary"); header("Content-Description: File Transfer"); # header("Content-Description: inline"); header("Content-Length: ". strlen( $content ) ); print $content; exit; } ?>