PHP

PHP and Google TTS (text to speech) solution writes MP3 files. Playback via HTML5 audio player

I wrote a simple solution that takes text (var or input) and speaks it using your browsers built in HTML5 audio player. Source code available Demo Here: http://stuffthatspins.com/stuff/php-TTS/

Read More...

concrete5

looks like concrete5 has a lot of potential. would consider using it for the next “wordpress” type project.

Read More...

PHP Sitemap Generator

After a bit of searching I’ve found a nice solution for creating and submitting sitemaps to Google, Bing and Yahoo… PHPSitemapNG http://enarion.net/tools/phpsitemapng/download/#kiting

Read More...

PHP function to sort multidimensional arrays

nice little function to sort php multidimensional arrays: /////////////////////////////////////// /// SORT MULTIDIMENSIONAL ARRAYS //// /////////////////////////////////////// function subval_sort($a,$subkey) { foreach($a as $k=>$v) { $b[$k] = strtolower($v[$subkey]); } asort($b); foreach($b as $key=>$val) { $c[] = $a[$key]; } return $c; }

Read More...

PHP + Javascript – limit characters in multiple text areas within same form

Javascript ¬†<script language=”javascript” type=”text/javascript”> //http://www.phpfreaks.com/forums/javascript-help/%28solved%29-javascript-character-limit-with-multiple-textareas/ function checkTextArea(id,limit){ //alert (“id ” +id +” limit ” + limit); if (document.getElementById(id)){ //alert(“id ” + id); var txt = document.getElementById(id).value; if (txt.length>limit){ //alert (“reached text limit: ” + limit + ” characters”); document.getElementById(id).value = txt.substr(0,limit); } len = document.getElementById(id).value.length; //alert (“len: ” + len); //alert (“limit”); span_id = “counter”…

Read More...

JQUERY issues with Google Chrome .ajax() doesn’t load

For the life of me I couldn’t figure out why my JQuery .ajax() call wouldn’t load in Google Chrome. Especially when it worked in Firefox, IE and Safari which I thought is based on the same WebKit browser. Anyhow, I found the issue to be in the data format AND having null vars. $.ajax({ type:…

Read More...

MCrypt PHP5 Ubuntu Install

Ubuntu: PHP mCrypt Installation mCrypt is an encryption program used on Linux systems. To install mCrypt for PHP5 on your Ubuntu Linux system: sudo apt-get install php5-mcrypt Then restart Apache with: sudo /etc/init.d/apache2 restart I needed to do this so that¬† phpMyAdmin would have mcrypt available. For more info about mcrypt, visit: Official site http://mcrypt.hellug.gr…

Read More...

PHP MySQL JQuery AJAX Checkbox Array Sample

so i needed to have a PHP / Jquery Checkbox sample that read and updated from MySQL db. combined a few different samples to come up with this guy… demo download

Read More...