1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- $url = "";
- $loc = "US";
- if( isset( $_GET['loc'] ) ) {
- $loc = strtoupper($_GET["loc"]);
- }
-
- //get the image url
- if (isset( $_GET['i'] ) ) {
- $url = $_GET[ 'i' ];
- } else {
- exit();
- }
- //we can only do jpg and png here
- if (strpos($url, ".jpg") && strpos($url, ".jpeg") && strpos($url, ".png") != true ) {
- echo strpos($url, ".jpg");
- echo "Unsupported file type :(";
- exit();
- }
- //image needs to start with http
- if (substr( $url, 0, 4 ) != "http") {
- echo("Image failed :(");
- exit();
- }
- ?>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 2.0//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <link rel="stylesheet" type="text/css" href="/main.css">
- <title>
- 68k.news Image Viewer
- </title>
- </head>
- <body">
- <small><a href="<?php echo $_SERVER['HTTP_REFERER'] . '?loc=' . strtoupper($loc) ?>">< Back to article</a> | <a href="/index.php"><font color="#9400d3">68k.news</font> front page</a></small>
- <p><small><b>Viewing image:</b> <?php echo $url ?></small></p>
- <img src="/image_compressed.php?i=<?php echo $url; ?>">
- <br><br>
- <small><a href="<?php echo $_SERVER['HTTP_REFERER'] . '?loc=' . strtoupper($loc) ?>">< Back to article</a> | <a href="/index.php"><font color="#9400d3">68k.news</font> front page</a></small>
- </body>
- </html>
|