Larry Brouwer

... just my personal technology sandbox

  • About
  • Blog
  • Archives
  • Contact

Connect

  • Email
  • Facebook
  • LinkedIn

Powered by Genesis

PHP Random Key Generator

January 10, 2012 By Larry Brouwer Leave a Comment

Yesterday, I needed a way to generate a random alpha-numeric key of various lengths using PHP for a project that I’m currently working on. I didn’t find any built-in functions, so after some Googling, I decided to implement my own version.

[code type=PHP]

private function generateRandomKey($len)

{

$chars = array(‘1′,’2′,’3′,’4′,’5′,’6′,’7′,’8′,’9′,’0’,

‘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’);

$min = 0;

$max – sizeof($chars)-1;

$key = “”;

for ($i=0; $i<$len; $i++) {

$key .= $chars[mt_ramd($min, $max)];

}

return $key;

}

[/code]

 

Let me know if anyone has a better suggestion?

Filed Under: Daily Log Tagged With: PHP

Installing TomatoCart on Windows Server 2008

January 15, 2011 By Larry Brouwer Leave a Comment

I’m continuing my evaluation of open source ecommerce packages by installing TomatoCart. TomatoCart was chosen as the second runner-up of the 2010 Open Source Awards as published by Packt Publishing.

I began my TomatoCart installation by reviewing the tomato Cart documentation WiKi. The wiki has many uncompleted links, but I managed to find the TomatoCart User Guide, which covered the basics needed to get the software installed.

I downloaded the current version, TomatoCart v1.1.3, and saved it to my “install\tomatocart” folder. I then created a new “tomatocart” folder under my “www” root folder and copied the contents of the “gtrunk2” folder from the downloaded file there.

[Read more…]

Filed Under: Notable Tagged With: eCommerce, MySQL, PHP, TomatoCart

Installing OpenCart on Windows Server 2008

January 15, 2011 By Larry Brouwer Leave a Comment

Today, I’m attempting to install OpenCart, an open source ecommerce package. OpenCart was chosen as the runner-up of the 2010 Open Source Awards as published by Packt Publishing.

I first looked through the OpenCart Online Documentation. The most current stable release as of this writing is OpenCart v1.4.9.3. OpenCart requires PHP, and MySQL. I currently have both installed on my Windows Server 2008 platform. It should also work fine running  under Windows IIS 7.

As a side note, the OpenCart Tools section outlines some great suggestions for free tools. I use some of them, like Jing, others I’m excited to check out.

[Read more…]

Filed Under: Daily Log Tagged With: eCommerce, MySQL, OpenCart, PHP

Installing PrestaShop on Windows Server 2008

January 12, 2011 By Larry Brouwer Leave a Comment

This morning, I’m working on installing open source ecommerce packages on my Windows Server 2008 box. This is mainly for experimental and learning purposes.

The first package I choose to install is PrestaShop. PrestaShop was chosen as the winner of the 2010 Open Source Awards as published by Packt Publishing.

My first step was to read through the most current PrestaShop User Guide. The most current stable version as of this writing is PrestaShop v.1.3.5. PrestaShop uses a MySql Database, so my first task is to install the current release of MySql (5.5.8) on my Windows 2008 server.

Since I’m not currently using MySql on a daily basis, I also made sure all of my workstation components (i.e. workbench, connector, etc.) are also up to date.

[Read more…]

Filed Under: Notable Tagged With: eCommerce, MySQL, PHP, PrestaShop

Recent Posts

  • Weaver’s Bamboo “Bambusa textilis” clumping bamboo for sale
  • configuring NTP Service on FreeNas, XenServer, and virtualized Windows Server 2012 R2 Domain Controller
  • CentOS 7 Warning: Your Magento folder does not have sufficient write permissions.
  • AOE Scheduler 1.3.0 cron issue with Magento 1.9.2.2

Tag cloud

SVN Outlook 2007 Log Parser Windows 7 Tools PST eCommerce DIR-655 redirect Spam Live Writer SSL Port 25 IIS7 PHP mstsc.exe Outlook Connector 301 Visual Studio Comcast CentOS Database Mail OfficeLive Windows Remote Desktop SSMS Silverlight Linux Maytag ASP.Net TomatoCart iframe Neptune web.config AWStats Exchange 2010 WordPress D-Link SqlServer Azure BlogEngine.Net Blogs SMTP DotNetNuke Scanpst.exe SmarterMail