Cześć,
mam katalog z obrazkami. W nich przykladowo pliki 54.png 53.jpg i jaka regule trzeba napisac zeby dzialaly losowe linki z tym numerem na poczatku. Przykladowo:
54.png -- > 54sd7yhu2.png lub 54-jdsay2,png
53.jpg --> 53-testes.jpg itd.
switch ($_GET['img']) { case '53.jpg': $link='53-testes.jpg'; break; default: $link='domyslne.png'; }
<? if($ext == 'jpg' || $ext == 'jpeg') $x = imagecreatefromjpeg('img/'.$a.'.'.$ext); else if($ext == 'png')$x = imagecreatefrompng('img/'.$a.'.png'); imagealphablending($x, true); imagesavealpha($x, true); imagepng($x); imagedestroy($x); ?>
<img src="img/5442wfs.png">