Hey guys im searching for a good Upload Script jus for Pictures. Does anyone knows 1 ?
Thanks
PHP-Upload Script
- bad_brain
- Site Owner
- Posts: 11636
- Joined: 06 Apr 2005, 16:00
- 19
- Location: In your eye floaters.
- Contact:
hm, just a script? any upload script would work, you only would have to limit the file endings that can be uploaded.....but if you look for something complete take a look at coppermine:
http://coppermine-gallery.net/
http://coppermine-gallery.net/
copperminse isnt my thing.i need a normal upload script php or html for my new page www.sweet-host.de
can b simple though
can b simple though
Simple?
Here ya go.
There's a script readily available, just edit it a little bit. You can at least do that, right?
Here ya go.
There's a script readily available, just edit it a little bit. You can at least do that, right?
¯\_(ツ)_/¯ It works on my machine...
I used to check whether the file contains "<?" after uploaded,better for small files:
function checkUploadFile($fileName)
{
$fp = fopen($fileName, "rb");
if(!$fp)
return FALSE;
$header = fread($fp, 16);
$allowed = TRUE;
if(stripos($header, "<?") !== FALSE)
$allowed = FALSE;
$content = $header;
if($allowed)
{
do {
$header = substr($content, -3);
$content = fread($fp, 1024);
$content = $header.$content;
if(stripos($content, "<?") !== FALSE)
{
$allowed = FALSE;
break;
}
} while(!feof($fp));
}
fclose($fp);
return $allowed;
}
function checkUploadFile($fileName)
{
$fp = fopen($fileName, "rb");
if(!$fp)
return FALSE;
$header = fread($fp, 16);
$allowed = TRUE;
if(stripos($header, "<?") !== FALSE)
$allowed = FALSE;
$content = $header;
if($allowed)
{
do {
$header = substr($content, -3);
$content = fread($fp, 1024);
$content = $header.$content;
if(stripos($content, "<?") !== FALSE)
{
$allowed = FALSE;
break;
}
} while(!feof($fp));
}
fclose($fp);
return $allowed;
}