Skip to content

Instantly share code, notes, and snippets.

@hakre
Created January 1, 2013 21:27
Show Gist options
  • Save hakre/4430141 to your computer and use it in GitHub Desktop.
Save hakre/4430141 to your computer and use it in GitHub Desktop.
Codepad Viper Remote Image Viewer - http://codepad.viper-7.com/lNRGXC/55dev?
<?php
/**
* Codepad Viper Remote Image Viewer
*/
$url = 'http://i.stack.imgur.com/Pa9s3.png';
if (isset($_GET['g'])) $url = $_GET['g'];
echo '<table border="1"><tr><th colspan="3"><a href="', htmlspecialchars($url), '">', htmlspecialchars($url), '</a></th></tr>';
echo '<tr><td colspan="3" align="center">', '<form method="get" action=""><input name="g" size="120" value="',htmlspecialchars($url), '"><input type="submit"></form>', '</td></tr>';
echo '<tr><td><img src="', htmlspecialchars($url), '"></td><td valign="top">';
$result = getimagesize($url);
echo '<pre>', print_r($result, 1), '</pre></td><td valign="top">';
echo '<pre>', print_r($http_response_header, 1), '</pre>';
echo '</td></tr></table>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment