The following php function code will generate random code , you have to call the function name with length for the code 🙂
function generateRandomCode($length)
{
$chars = "234567890abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
$i = 0;
$url = "";
while ($i <= $length) {
$url .= $chars{mt_rand(0,strlen($chars))};
$i++;
}
return $url;
}
and to view the out put just call the function like this
echo generateRandomCode(16);
that’s it.
Hi Samrat, I am using your file uploader, but the attachments go to my directory folder in /wp-content/uploads instead of sending to an email to me directly. Is there a way to drop a notification to me directly instead of me manually going into the directory folder to check? Thanks. FN
hi,
thanks to for try it, but it should send the uploaded file to the admin email address as attachment.
and this plugins takes the email address from wordpress admin -> setting -> admin email . please check the email address is set properly.