November 17, 2024, 09:36:47 AM

1,531,348 Posts in 46,734 Topics by 1,523 Members
› View the most recent posts on the forum.


Alright Lawlz,

Started by Feynman, July 31, 2007, 01:42:25 PM

previous topic - next topic

0 Members and 1 Guest are viewing this topic.

Go Down

Feynman

http://valentrinne.com/image/tofavvy3/tofavvy3.php

WHAT IS THE MEANING OF THIS?

Code Select
<?php

$folder '.';

    
$extList = array();
$extList['gif'] = 'image/gif';
$extList['jpg'] = 'image/jpeg';
$extList['jpeg'] = 'image/jpeg';
$extList['jp2'] = 'image/jp2';
$extList['png'] = 'image/png';

$img null;

if (
substr($folder,-1) != '/') {
$folder $folder.'/';
}

if (isset(
$_GET['img'])) {
$imageInfo pathinfo($_GET['img']);
if (
    isset( $extListstrtolower$imageInfo['extension'] ) ] ) &&
        
file_exists$folder.$imageInfo['basename'] )
    ) {
$img $folder.$imageInfo['basename'];
}
} else {
$fileList = array();
$handle opendir($folder);
while ( false !== ( $file readdir($handle) ) ) {
$file_info pathinfo($file);
if (
    isset( $extListstrtolower$file_info['extension'] ) ] )
) {
$fileList[] = $file;
}
}
closedir($handle);

if (count($fileList) > 0) {
$imageNumber time() % count($fileList);
$img $folder.$fileList[$imageNumber];
}
}

if (
$img!=null) {
$imageInfo pathinfo($img);
$contentType 'Content-type: '.$extList$imageInfo['extension'] ];
header ($contentType);
readfile($img);
} else {
if ( function_exists('imagecreate') ) {
header ("Content-type: image/png");
$im = @imagecreate (100100)
    or die ("Cannot initialize new GD image stream");
$background_color imagecolorallocate ($im255255255);
$text_color imagecolorallocate ($im0,0,0);
imagestring ($im255,  "IMAGE ERROR"$text_color);
imagepng ($im);
imagedestroy($im);
}
}

?>


Ahhh, man what a sweet copy/paste.

Daddy

WHY DOES THE LINE GO DOWN SO FAR?

NOA_Haunted

What does that even mean?

Feynman


guff

aaaaaaaaaaah why does it overflow out of the code box

Daddy

Quote from: Commodore Guff on July 31, 2007, 01:50:26 PM
aaaaaaaaaaah why does it overflow out of the code box
bassir fix'd it dood.

guff


Feynman

by fix'd i mean look at lawlz's avatar or click the link

guff

Quote from: Bassir C. on July 31, 2007, 01:53:46 PM
by fix'd i mean look at lawlz's avatar or click the link
okay so why so much spill over

Feynman


ncba93ivyase


Quote from: ncba93ivyase on June 18, 2014, 07:58:34 PMthis isa great post i will use it in my sig

guff

July 31, 2007, 03:49:11 PM #11 Last Edit: July 31, 2007, 04:05:23 PM by Commodore Guff
Quote from: Bassir C. on July 31, 2007, 01:57:38 PM
lol windows

its fine for me
uh hold on let me check on ubuntututut
same problem
Safari gave me the same problem.

ps safari on windows blows

ncba93ivyase

So what exactly is the problem? psyduck;

Quote from: ncba93ivyase on June 18, 2014, 07:58:34 PMthis isa great post i will use it in my sig

guff


ncba93ivyase


Quote from: ncba93ivyase on June 18, 2014, 07:58:34 PMthis isa great post i will use it in my sig

Go Up