Autoindex! :)

Started on the old forum in May 2012 · view the original in the archive · old links redirect here

7 replies · 2,129 views · started 14 years ago · 1 min read

6 participants
icedroplet1987 Senior · 258 posts #2

nothing much modded from the one NEOstar posted here but yup, liked the simpliness of it.

thanks for sharing:)

kristapsm Junior · 29 posts #3

icedroplet1987 wrote: nothing much modded from the one NEOstar posted here but yup, liked the simpliness of it.

thanks for sharing:)

Sorry if it is already here, just simple validated small errors and maked better and simplest look. ☺️

Simran Kamboj Junior · 13 posts #4

XML Parsing Error: junk after document element Location: Downloads Line Number 9, Column 924:fullmasti.tk Downloads Preview: +/- Sort by: name/date External image (may be gone) Games [0 / 0 kb] External image (may be gone) Images [0 / 0 kb] External image (may be gone) Music [0 / 0 kb] External image (may be gone) Themes [0 / 0 kb] External image (may be gone) Videos [0 / 0 kb] fullmasti.tk</body></html><script type="text/javascript"> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^

How to remove this error...

StunningNick Junior · 40 posts #5

Image.php

some editing with image.php

<?php
// Get new dimensions
$RESuploadFolderPath = '';
extract($_REQUEST);
if($f){

if ( isset( $w , $h , $q )  )
{
	$w = (int) $w;
	$h = (int) $h;
	$q = (int) $q;
	
	$w = ( $w > 0 && $w < 1000 ) ? $w : 50;
	$h = ( $h > 0 && $h < 1000 ) ? $h : 60;
	$h = ( $h > 0 && $h <= 100 ) ? $h : 80;
}
else
{
$w = 50;
$h = 60;
$h = 80;
}
$filename = $RESuploadFolderPath.$f;
if ( is_file( $filename ) )
{
	// get original file's height & width
	list($width, $height) = getimagesize($filename);
	$filetype = pathinfo($filename);
	$fileNameOnly = $filetype['filename'];

	switch($filetype['extension'])
	{
	case 'jpg':
	$source = imagecreatefromjpeg($filename);
	break;
	case 'gif';
	$source = imagecreatefromgif($filename);
	break;
	case 'png':
	$source = imagecreatefrompng($filename);
	break;
	}

	$image_p = imagecreatetruecolor($new_width, $new_height);
	imagecopyresampled($image_p, $source, 0, 0, 0, 0, $new_width, $new_height, $width, $height);

	header('Content-type: image/jpeg');
	header("Content-Disposition: attachment; filename=\"".$fileNameOnly."\";" );
	header("Content-Transfer-Encoding: binary");
	header("Content-Length: ".filesize($filename));
	imagejpeg($image_p, null ,$quality);
	}
	else
	{
		echo 'Some Text Here :P ';
	}
}

thanks for sharing, got solution for other script from this :)

Don't think i am bad , i used to be too good one time...

kristapsm Junior · 29 posts #6

StunningNick wrote: some editing with image.php

<?php
// Get new dimensions
$RESuploadFolderPath = '';
extract($_REQUEST);
if($f){

if ( isset( $w , $h , $q )  )
{
	$w = (int) $w;
	$h = (int) $h;
	$q = (int) $q;
	
	$w = ( $w > 0 && $w < 1000 ) ? $w : 50;
	$h = ( $h > 0 && $h < 1000 ) ? $h : 60;
	$h = ( $h > 0 && $h <= 100 ) ? $h : 80;
}
else
{
$w = 50;
$h = 60;
$h = 80;
}
$filename = $RESuploadFolderPath.$f;
if ( is_file( $filename ) )
{
	// get original file's height & width
	list($width, $height) = getimagesize($filename);
	$filetype = pathinfo($filename);
	$fileNameOnly = $filetype['filename'];

	switch($filetype['extension'])
	{
	case 'jpg':
	$source = imagecreatefromjpeg($filename);
	break;
	case 'gif';
	$source = imagecreatefromgif($filename);
	break;
	case 'png':
	$source = imagecreatefrompng($filename);
	break;
	}

	$image_p = imagecreatetruecolor($new_width, $new_height);
	imagecopyresampled($image_p, $source, 0, 0, 0, 0, $new_width, $new_height, $width, $height);

	header('Content-type: image/jpeg');
	header("Content-Disposition: attachment; filename=\"".$fileNameOnly."\";" );
	header("Content-Transfer-Encoding: binary");
	header("Content-Length: ".filesize($filename));
	imagejpeg($image_p, null ,$quality);
	}
	else
	{
		echo 'Some Text Here :P ';
	}
}

thanks for sharing, got solution for other script from this :)

🙂 Always welcome!

razib Developer · 132 posts #7

thanks for sharing....

🦸 Buying mobile traffic, PM me with your traffic details

devaobeth Newbie · 4 posts #8

brother i got error in this code

kristapsm wrote: Hope u all will like! :)

Notice: Undefined variable: dir in C:\xampp\htdocs\101\index.php on line 96

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close