SolveErrors
PHP

Syntax help - $random_name

47 views

Am I anywhere close with this? I really only wanted an auto incrementing of the "file number.png" but I have no idea what search key words to use as they all return mysql tutorials.

PHP Code:
?$base_img_dir?=?("../thumbs/");


srand();
$random_name?=?uniqid(rand())?.?".png";

ImagePNG($im,?($base_img_dir/($random_name)));
imagepng($im);
imagedestroy($im);?


I'll need to keep the image name short for use on forums that only allow limited numbers of characters in posts. MD5 would be overkill I think.

More PHP fixes

PHP-General - Header tag not directing to specified pageindex.php wont load index.html will loadHow to cut down the size of a URL?Warning: oci_free_statement(): 3 is not a valid oci8 statement resourcePage 2 - str_replacePHP-General - Variabses wont load