Install libpurple with PHP

libpurple is intended to be the core of an IM program. This libpurple PHP binding, which defines a set of internal classes, gives a possibility to use aol and icq (oscar), yahoo, msn, jabber, irc and much more protocols directly from PHP. Write your own IM chat client in PHP, as simply as PHP enables … Read more

Session lost when switching from HTTP to HTTPS in PHP

Sometime we face the problem when we navigate from HTTP URL to HTTPS URL our session lost. You can manage session between HTTP to HTTPS or HTTPS to HTTP: 1. Transmit session ID between page using GET 2. POST session ID by POST 3. Use files to save sessions 4. Use Cookies for sessions 5. … Read more

Magic of PEAR – Date TimeZone

PEAR is a framework and distribution system for reusable PHP components. How we get PEAR packages with php files? Add block of code to the php file…. <?php // include PEAR class include (“Date.php”); // initialize Date object $d = new Date(“1981-08-07 01:30:11”); // retrieve date to display echo $d->getDate(); // retrieve date as formatted … Read more

Oscommerce – Features

* Multi language * Content Management ~ WYSIWYG editor integrated into the shop admin to allow easy entering    of    HTML and uploading of images ~ Add text to your category pages – great for SEO and providing information ~ Content Management System – no more FTP and working with PHP files – amend text for … Read more

Create TCPDF PHP Fonts

TCPDF supports TrueTypeUnicode (UTF-8 Unicode), OpenTypeUnicode, TrueType, OpenType, Type1, CID-0 and Core (standard) fonts. You will find font creation utility at fonts/utils of TCPDF… copy desired font to fonts/utils/svnlabs.ttf * For TrueTypeUnicode # cd /var/www/html/tcpdf/fonts/utils # ttf2ufm -a -F svnlabs.ttf # php -q makefont.php svnlabs.ttf svnlabs.ufm * For embedded fonts to tcpdf PDF file.. copy … Read more

Trim and remove empty key & value in php array

Here is the PHP function that will remove empty key => value in PHP array… function array_trim($sv) { $s = 0; $svn = null; $c = count($sv); for($i = 0; $i < $c; $i++) { if($sv[$i] != “”){ $svn[$s++] = trim($sv[$i]); } } return $svn; } $svarray = array(‘   ‘, ‘svlinux’, ‘svnlabs’, ‘lamp’, ”); $svarray … Read more

Oscommerce – made easy

osCommerce is an online e-commerce solution that offers a wide range of features that allows online stores to be setup quickly with ease, and is available for free as an Open Source based solution released under the GNU General Public License. http://svn.oscommerce.com/confluence/display/OSCDOC/Installation+and+Upgrades http://www.oscommerce.info/contents