route banners through proxy when using tor
This commit is contained in:
parent
36f670efed
commit
e4b58975b4
3 changed files with 37 additions and 4 deletions
|
@ -3,6 +3,14 @@ include "internal/header.php";
|
|||
include "internal/footer.php";
|
||||
include "internal/mysql.php";
|
||||
|
||||
if (strpos($_SERVER['HTTP_HOST'], '.onion') !== false) {
|
||||
$heIMG = "/internal/getImage.php?imgID=1";
|
||||
$abuseIPIMG = "/internal/getImage.php?imgID=2";
|
||||
} else {
|
||||
$abuseIPIMG = "https://www.abuseipdb.com/contributor/45130.svg";
|
||||
$heIMG = "https://ipv6.he.net/certification/create_badge.php?pass_name=jonasled&badge=3";
|
||||
}
|
||||
|
||||
getHeader("Jonas Leder", "home");
|
||||
?>
|
||||
<div class="center">
|
||||
|
@ -45,8 +53,8 @@ getHeader("Jonas Leder", "home");
|
|||
</div>
|
||||
<div id="banner">
|
||||
<h2>Banner</h2>
|
||||
<a target="_blank" href="https://ipv6.he.net"><img src="https://ipv6.he.net/certification/create_badge.php?pass_name=jonasled&badge=3"></a>
|
||||
<a target="_blank" href="https://www.abuseipdb.com/user/45130"><img style="background-color: white" src="https://www.abuseipdb.com/contributor/45130.svg" style="width: 401px;"></a>
|
||||
<a target="_blank" href="https://ipv6.he.net"><img src="<?php echo($heIMG); ?>"></a>
|
||||
<a target="_blank" href="https://www.abuseipdb.com/user/45130"><img style="background-color: white" src="<?php echo($abuseIPIMG); ?>" style="width: 401px;"></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
|
24
public/internal/getImage.php
Normal file
24
public/internal/getImage.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
$url = "";
|
||||
|
||||
if( isset( $_GET['imgID'] ) )
|
||||
{
|
||||
if($_GET['imgID'] == "1") {
|
||||
$url = "https://ipv6.he.net/certification/create_badge.php?pass_name=jonasled&badge=3";
|
||||
} else if($_GET['imgID'] == "2"){
|
||||
$url = "https://www.abuseipdb.com/contributor/45130.svg";
|
||||
} else {
|
||||
die("wrong image id");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
die("no image ID set");
|
||||
}
|
||||
|
||||
$imginfo = getimagesize( $url );
|
||||
header("Content-type: ".$imginfo['mime']);
|
||||
readfile( $url );
|
||||
|
||||
?>
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
include "config.php";
|
||||
include "menue.php";
|
||||
|
||||
function getHeader($pagetitle, $navselect)
|
||||
{
|
||||
include "config.php";
|
||||
include "menue.php";
|
||||
|
||||
$menu = getMenu($navselect);
|
||||
if (strpos($_SERVER['HTTP_HOST'], '.onion') !== false) {
|
||||
$trackURL = $trackURLTor;
|
||||
|
|
Loading…
Reference in a new issue