Hi, I am representing my Neopets guild, Rapport. I am currently coding a layout for my guild, and am featuring a webcam (randomized images).
An example of the randomized image can be found on xdriftingdreamx's userlookup (refresh for a new banner).
To recreate the user's effect, I need to display (<img src>) a randomized .png image that will change upon refresh.
Neopet's filter disallows:
- image linking to a .php file
- Javascript
- absolute link to any webpage outside of neopets.com
Even with restrictions, the mentioned user has found a way to use PHP to randomize their images while tricking the Neopet filter in believing it as an image file. I am trying to recreate that for the webcam.
----
So far, my image will rotate, but will not display upon <img src>.
PHP:
<?
$files = glob('{.PNG,.png,.JPG,.jpg,.GIF,.gif}', GLOB_BRACE);
shuffle($files);
list($width, $height, $type, $attr) = getimagesize($files[0]);
print("<img src=\"$files[0]\" width=\"$width\" height=\"$height\" alt=\"\" ><br>\n");
//foreach ($files as &$value) {
//print("<img src=\"$value\"><br>\n");
//}
header('Content-type: image/jpeg');
$image = imagecreatefromjpeg($filename);
imagejpeg($image, null, 100);
imagedestroy($image);
exit;
?>
.HTACCESS*
RewriteEngine On
RewriteBase /
RewriteRule Sample_Picture02.jpg$ rotate.php
The .htaccess is supposed to rewrite the rotate.php as an image file, but I am not sure if it actually works; I copied it off a tutorial.