Plaatjes upload systeem.

Gestart doorJeffreyy7 reacties33 weergaven

8 berichten · pagina 1 van 1

Jeffreyy

Lid · Topicstarter

Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik zoek een plaatjes upload systeem waar je plaatjes upload, en dat dan de naam veranderwn ord in bijv. 8th8sg.png.. Heeft iemand dit?

Edit: Bijvoorbeeld die van upload-hier.nl, Die maakt van de naam DSC00024.JPG maakt ie 768192DSC00024.JPG
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
gwn upload script maar dan door md5 te halen
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Of via

[COLOR= #0000BB]<?php
$code[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]1000[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]9999[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$code[/COLOR][COLOR= #007700];[/COLOR]
?>


Dan komt een random getal tussen de 1000 en 9999
0
Jeffreyy

Lid · Topicstarter

Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kan iemand dat stukje inbouwewn van Milan in dit script:

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]//verander de onderstaande gegevens[/COLOR]

[COLOR= #0000BB]$locatie[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"foto/"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//of een andere map, vergeet niet de w-rechten[/COLOR]
[COLOR= #0000BB]$toegestaan[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"jpg"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"gif"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"png"[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// extensies die toegestaan zijn[/COLOR]
[COLOR= #0000BB]$max_size[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]150000[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//maximale grootte van het bestand in bytes /1024 = kb /1024 = mb[/COLOR]
[COLOR= #0000BB]$jousite[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"http://www.jouwdomein.com/"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// eindigent op een slash

//stop met veranderen[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]upload[/COLOR][COLOR= #007700]]))
{[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/is_uploaded_file"]is_uploaded_file[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]tmp_name[/COLOR][COLOR= #007700]]))
    {[/COLOR]
        [COLOR= #0000BB]$extensie_bestand[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/pathinfo"]pathinfo[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$extensie_bestand[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$extensie_bestand[/COLOR][COLOR= #007700][[/COLOR]extension[COLOR= #007700]];[/COLOR]

        [COLOR= #0000BB]$extensies_toegestaan[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$toegestaan[/COLOR][COLOR= #007700]);[/COLOR]

        [COLOR= #0000BB]$ok[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/in_array"]in_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$extensie_bestand[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$toegestaan[/COLOR][COLOR= #007700]);[/COLOR]

        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ok[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])
        {[/COLOR]
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]size[/COLOR][COLOR= #007700]] >[/COLOR] [COLOR= #0000BB]$max_size[/COLOR][COLOR= #007700])
            {[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Het bestand is te groot, de maximale grootte is: <b>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$max_size[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"</b>"[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];
            }[/COLOR]

            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/move_uploaded_file"]move_uploaded_file[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]tmp_name[/COLOR][COLOR= #007700]],[/COLOR][COLOR= #0000BB]$locatie[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]]))
            {[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"het bestand kan niet worden verplaatst"[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];
            }[/COLOR]

            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Het bestand "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" is geupload<br /><a href="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$locatie[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" target=_blank>Klik hier om het te bekijken</a><br />De link is : "[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$jousite[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$locatie[/COLOR] [COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]];
        }[/COLOR]
        [URL="http://www.php.net/else"]else[/URL]
        [COLOR= #007700]{[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Verkeerde extentie, de toegestane extensies zijn: <b>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$toegestaan[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"</b>"[/COLOR][COLOR= #007700];
        }
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL]
    [COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Het uploaden is mislukt"[/COLOR][COLOR= #007700];
    }

}[/COLOR]
?>
<br />
<form method="post" action="" enctype="multipart/form-data">
<input type="file" name="bestand" /><br />
<input type="submit" name="upload" value="Uploaden!" />
</form>
0
Pgff

Lid

Berichten
390
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik kan ook aan een heel systeem komen
zoals die site wat je zei

Pm me voor info
0
Jeffreyy

Lid · Topicstarter

Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja, maar das vast niet gratis?
0
Jeffreyy

Lid · Topicstarter

Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
bump
Kan iemand het script hierboven zo maken dat hij hem omzet, dat als ik DSC00024.JPG upload dat hij er dan bijv. 156ggtDSC00024.JPG van maakt?
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren