The universal serial maker

My PHP Stuff

One day, I’ve made an idea: How about make something useful? Finally, I made this universal serial maker. This serial maker actually generates a 25-characters serials (xxxxx-xxxxx-xxxxx-xxxxx-xxxxx where x is uppercase A-Z and numbers.). The program guess the combinations of serials and outputs a random serial like:

MVDZM-1GWM7-LWQNQ-NPFM3-8X1S4

I4VUJ-AX939-FJLRY-JBBS9-ZB2CS

T4AJE-28XXR-NSL4G-GOIKX-TJA9F

QANQ6-03EMI-GPS13-V60G9-8E6C3

1J873-RXG0X-FE1NZ-B60C7-DCMMY

QJM3R-HMHQK-D6PMP-FJZKC-NILSM

78KGY-3S5A8-KJUCT-N2SHM-U8WVX

NN29Z-4ACY3-92VZE-IBWRN-3SRDZ

0UDAM-7LTG7-B16SP-9JER4-C6QK2

LDE9Y-MLUJ2-UR2FS-Y9DRK-QYAYL

This format of serials is suitable for many products. However, there’re still some products that don’t use this format of serials. (e.g. Adobe products.)

The source code:

<?php

for($i = 0;$i < 10; $i++)

{

for($j = 1 ;$j < 26;$j++)

{

@$result.= substr(str_shuffle(“0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ”),$j,1);

if(!is_float($j/5))

{

$result.=”-“;

}

}

echo substr($result,0,strlen($result)-1) . PHP_EOL;

$result = null;

}

?>

This generates 10 serials at a time. Hope it’ll help you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s