35 public static function uniqcode( $prefix =
'', $posfix =
'', $max_length = 64 )
37 $uniqcode = uniqid( $prefix ) . $posfix;
38 if ( ( $uniqcode_len = strlen( $uniqcode ) ) > $max_length ) {
40 return substr( $uniqcode, -$max_length );
57 $alfa =
'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z';
58 $num =
'0,1,2,3,4,5,6,7,8,9';
62 $alfa = explode(
',', $alfa );
63 $num = explode(
',', $num );
66 $misc = array_merge( $alfa, $num );
68 $result = substr( implode(
'', $misc ), 0, $len );