<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: Generating a Software License Key String with PHP</title>
	<atom:link href="https://www.webmaster-source.com/2013/02/13/generating-a-software-license-key-string-with-php/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.webmaster-source.com/2013/02/13/generating-a-software-license-key-string-with-php/</link>
	<description>Useful Resources For Webmasters</description>
	<lastBuildDate>Wed, 29 Apr 2026 13:07:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.42</generator>
	<item>
		<title>By: Sajjad Hossain</title>
		<link>https://www.webmaster-source.com/2013/02/13/generating-a-software-license-key-string-with-php/#comment-39121</link>
		<dc:creator><![CDATA[Sajjad Hossain]]></dc:creator>
		<pubDate>Fri, 25 Jan 2019 14:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4998#comment-39121</guid>
		<description><![CDATA[I have created one like this 

&lt;code&gt;$license = rand(1000,9999) . &#039;-&#039; . rand(1000,9999) . &#039;-&#039; . rand(1000,9999) . &#039;-&#039; . rand(1000,9999) . &#039;-&#039; . rand(1000,9999);&lt;/code&gt;

I have already using in my project to generate and validate purchased user. &lt;a href=&quot;https://phpans.com/how-to-create-license-key-in-php/&quot; rel=&quot;nofollow&quot;&gt;Here is details&lt;/a&gt;]]></description>
		<content:encoded><![CDATA[<p>I have created one like this </p>
<p><code>$license = rand(1000,9999) . '-' . rand(1000,9999) . '-' . rand(1000,9999) . '-' . rand(1000,9999) . '-' . rand(1000,9999);</code></p>
<p>I have already using in my project to generate and validate purchased user. <a href="https://phpans.com/how-to-create-license-key-in-php/" rel="nofollow">Here is details</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Silver Moon</title>
		<link>https://www.webmaster-source.com/2013/02/13/generating-a-software-license-key-string-with-php/#comment-39016</link>
		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Wed, 14 Oct 2015 13:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4998#comment-39016</guid>
		<description><![CDATA[$segment .= $tokens[ rand(0, strlen($tokens)-1) ];]]></description>
		<content:encoded><![CDATA[<p>$segment .= $tokens[ rand(0, strlen($tokens)-1) ];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rohan</title>
		<link>https://www.webmaster-source.com/2013/02/13/generating-a-software-license-key-string-with-php/#comment-38955</link>
		<dc:creator><![CDATA[Rohan]]></dc:creator>
		<pubDate>Mon, 01 Dec 2014 10:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4998#comment-38955</guid>
		<description><![CDATA[Thank you very much]]></description>
		<content:encoded><![CDATA[<p>Thank you very much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: redwall_hp</title>
		<link>https://www.webmaster-source.com/2013/02/13/generating-a-software-license-key-string-with-php/#comment-33189</link>
		<dc:creator><![CDATA[redwall_hp]]></dc:creator>
		<pubDate>Fri, 22 Feb 2013 06:20:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4998#comment-33189</guid>
		<description><![CDATA[The key is guaranteed unique by way of the second code block. Before storing the key in the database, a while loop ensures that the key hasn&#039;t already been assigned to a record.

Crypt() is another solution, possibly a better solution, but sometimes you want to make sure that the string is easy to read out loud or type manually.]]></description>
		<content:encoded><![CDATA[<p>The key is guaranteed unique by way of the second code block. Before storing the key in the database, a while loop ensures that the key hasn&#8217;t already been assigned to a record.</p>
<p>Crypt() is another solution, possibly a better solution, but sometimes you want to make sure that the string is easy to read out loud or type manually.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tran Ngoc Tuan Anh</title>
		<link>https://www.webmaster-source.com/2013/02/13/generating-a-software-license-key-string-with-php/#comment-33100</link>
		<dc:creator><![CDATA[Tran Ngoc Tuan Anh]]></dc:creator>
		<pubDate>Thu, 21 Feb 2013 05:56:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4998#comment-33100</guid>
		<description><![CDATA[While your method guarantees that the key is random, it doens&#039;t guarantee that 2 users have the same key (uniqueness). Why don&#039;t you use something simple like crypt() function. It&#039;s fast, simple and strong enough.]]></description>
		<content:encoded><![CDATA[<p>While your method guarantees that the key is random, it doens&#8217;t guarantee that 2 users have the same key (uniqueness). Why don&#8217;t you use something simple like crypt() function. It&#8217;s fast, simple and strong enough.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blaine Moore</title>
		<link>https://www.webmaster-source.com/2013/02/13/generating-a-software-license-key-string-with-php/#comment-32702</link>
		<dc:creator><![CDATA[Blaine Moore]]></dc:creator>
		<pubDate>Sat, 16 Feb 2013 13:06:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4998#comment-32702</guid>
		<description><![CDATA[Another way you could improve it is to use the last 5 characters as a checksum for the rest of the string (potentially with a salt) if there might ever be a need for validating the API key w/o a net connection to the server.]]></description>
		<content:encoded><![CDATA[<p>Another way you could improve it is to use the last 5 characters as a checksum for the rest of the string (potentially with a salt) if there might ever be a need for validating the API key w/o a net connection to the server.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/


Served from: www.webmaster-source.com @ 2026-04-29 15:47:00 by W3 Total Cache
-->