7 Simple Steps to create Twitter Application

First you have to download oAuth from github “An open protocol to allow secure API authorization in a simple and standard method from desktop and web applications.” 7 Simple Steps to create Twitter Application using Twitter’s OAuth…. 1. Build TwitterOAuth object Login to twitter and register a new application here https://twitter.com/oauth_clients … after registering application … Read more

How to Create OpenSearch Plugins?

OpenSearch is a collection of simple formats for the sharing of search results. OpenSearch description file https://www.svnlabs.com/opensearch.xml We have to create  a simple xml file for websites and search engines to publish search results in a standard and accessible format. See below the code in action……. <?xml version=”1.0″ encoding=”UTF-8″?> <OpenSearchDescription xmlns=”http://a9.com/-/spec/opensearch/1.1/”> <ShortName>svnlabs</ShortName> <LongName>svnlabs – Concentrate … 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

Install the Alternative PHP Cache (APC)

The Alternative PHP Cache (APC) is a free, open, and robust framework for caching and optimizing PHP intermediate code. yum install php-pear yum install php-devel httpd-devel yum groupinstall ‘Development Tools’ yum groupinstall ‘Development Libraries’ pecl install apc http://si2.php.net/manual/en/install.pecl.php

Install PECL Memcache with LAMPP

PECL Memcache client of memcached distributed cache server, is a very probable candidate for high-load systems. Typically you won’t be able to use “pecl” directly and when you try to install manually with phpize you will get an error like: ” PHP Warning: Unknown(): Unable to load dynamic library ‘/opt/lampp/lib/php/extensions/no-debug-non-zts-20020429/memcache.so’ – /opt/lampp/lib/php/extensions/no-debug-non-zts-20020429/memcache.so: undefined symbol: OnUpdateLong … Read more

Magento make easy – part1

Magento Create a dynamic, fully featured, online store with the most powerful open source e-commerce software…. Download Magento from here.. http://www.magentocommerce.com/svn # svn checkout http://svn.magentocommerce.com/source/branches/1.3 Features.. 1. Categories and Attributes 2. Taxes 3. Adding Simple Products 4. Minimum Customization of Your Store’s Appearance 5. Customer Relationships / Configuring customer options 6. Accepting Payment 7. Configure … Read more

Install JSON on linux

Have the fun with json…. JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. # yum -y install php-pear # pecl install json # vi /etc/php.d/json.ini extension=json.so # service httpd restart

Backup mysql database to amazon S3

Below is the simple code to create sql script of database on Amazon EC2 server using “mysqldump”… then upload this sql script to Amazon S3 bucket using command line S3 tool “s3cmd”… <?php $sqlbackup=”/usr/bin/mysqldump -v -u root -h localhost -r /var/www/html/backup/”.date(“Y-m-d-H-i-s”).”_db.sql -pdbusername  databasename 2>&1″; exec($sqlbackup, $o); echo implode(“<br /> “, $o); $file = “/var/www/html/backup/”.date(“Y-m-d-H-i-s”).”_db.sql”; $bucket = “s3bucketname”; exec(“/usr/bin/s3cmd  put –acl-public –guess-mime-type  –config=/var/www/html/.s3cfg   “.$file.”  s3://”.$bucket.”  2>&1″, $o); echo implode(“<br /> “, $o); ?> 0 */12 * * * env php -q /var/www/html/s3bkup/s3bkup.php > /dev/null 2>&1 (per 12 … Read more

Installing XAMPP in Linux

What is XAMPP ? XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. LAMPP (XAMPP for Linux) is very easy to install and to use – just download, extract and start. Download XAMPP http://sourceforge.net/projects/xampp/files/XAMPP Linux/ Installing XAMPP in Linux Download XAMPP Latest version from the following link http://sourceforge.net/projects/xampp/files/XAMPP Linux Currently latest … Read more