Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $user = 'user';
- $pass = 'pass';
- $domain = 'jan-ter.com';
- function getFile($fileQuery){
- global $user, $pass, $domain;
- return file_get_contents("https://$user:$pass@$domain:2083/".$fileQuery);
- }
- if(strpos($_SERVER['QUERY_STRING'],'.png')!==false) {
- $fileQuery = $_SERVER['QUERY_STRING'];
- }
- elseif(empty($_SERVER['QUERY_STRING'])){
- $fileQuery = "awstats.pl?config=$domain";
- }
- else {
- $fileQuery = 'awstats.pl?'.$_SERVER['QUERY_STRING'];
- }
- $file = getFile($fileQuery);
- if(strpos($_SERVER['QUERY_STRING'],'.png')===false) {
- $file = str_replace('awstats.pl', basename($_SERVER['PHP_SELF']), $file);
- $file = str_replace('="/images','="'.basename($_SERVER['PHP_SELF']).'?images',$file);
- }
- else {
- header("Content-type: image/png");
- }
- echo $file;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement