Send AWS SES Email attachments using Mail_Mime and AWS SDK PHAR for PHP

AWS SES allow AWS users to send emails with attachment using PEAR Mail_Mime, it will generate / manually chunking the raw message to pass it along to the AWS SDK for PHP PHAR “aws.phar”. First you need to request Amazon Web Services Support to increase your email sending quota per day in some AWS Region. … Read more

User Agent Parsing with PHP

Tobie Langel’s ua-parser, a great library which provides simple UA parsing in PHP, JavaScript and Python. <?php require_once ‘uaparser.php’; $ua = $_SERVER[‘HTTP_USER_AGENT’]; $parser = new UAParser(); $result = $parser->parse($ua); echo ‘<pre>’; print_r($result); ?> Find more libraries here… https://github.com/rjd22/ua-parser/tree/master/php https://github.com/Synchro/ua-parser

Upgrade PHP & MySQL on Plesk 10

1. Stop Running Apache & MySQL Server # /etc/init.d/mysqld stop # /etc/init.d/httpd stop 2. Set up the atomic channel # wget -q -O – http://www.atomicorp.com/installers/atomic | sh 3. Upgrade to PHP 5.3.x on plesk 10 # yum upgrade Now I can install “uploadprogress” extension easily pecl/uploadprogress requires PHP (version >= 5.2.0), installed version is 5.1.3 … Read more

PHP Bulk Emailer

If you send email to 5,000 people using standard PHP tools, your ISPs might be blocked in seconds. I think you already read below articles… Amazon Simple Notification Service Command Lines Theory About Bulk Emails Emails are not working on server? Amazon SES – Emails In Cloud Open source – Port25 Linux Mail Servers Email’s … Read more

PHP PEAR File Download Package

The PEAR package contains: * PEAR installer, for creating, distributing and installing packages * PEAR_Exception PHP5 error handling mechanism * PEAR_ErrorStack advanced error handling mechanism * PEAR_Error error handling mechanism * OS_Guess class for retrieving info about the OS where PHP is running on * System class for quick handling of common operations with files … Read more

SVNLabs Tools

HTML2CSV converts html/xhtml to csv/xls. VMG2TXT converts Nokia VMG message file to text file. VCard Parser Extract information from VCard. HTML2RSS converts html/xhtml to rss/xml feed. Amazon S3 upload file to Amazon S3 Bucket. CSV Mapper Import CSV file after adjusting Columns. JavaScript Twitter Bird a2zVideoAPI – search videos with page link EBook Search Engine … Read more

Pretty Print JSON

We can use function json_print() to explore JSON data, since JSON has no spacing or indentation. The function json_print() make JSON data to display in the human-readable format. <?php function json_print($json) {     $result = ”;     $pos = 0;     $strLen = strlen($json);     $indentStr = ‘ ‘;     $newLine = “\n”;     $prevChar = ”;     $outOfQuotes = true;     for … Read more

Amazon E-Commerce Service or ECS

Amazon’s ECS is very good service for accessing Amazon’s product database. We can register to this web service quickly, It provides a free access key to access Amazon Store. Amazon have rich set of web services 🙂 Web Services are used to access DATA over cross platform environments. Using ECS-driven websites and applications, we can earn … Read more

Override PHP Function

PHP have PECL (PHP Extension & Community Library) function to override built-in functions by replacing them in the symbol table. bool override_function ( string $function_name , string $function_args , string $function_code )   <?php override_function(‘strlen’, ‘$string’, ‘return override_strlen($string);’); function override_strlen($string){ return strlen($string); } ?> The above function “override_function()” require APD i.e. Advanced PHP Debugger. We … Read more

a2zVideo API

Welcome to the a2zVideoAPI wiki! This API supports video links to get video information like Embed Code, Video Thumb, Video Title, Video Description etc. How to use a2zVideoAPI: 1. Download “api.php” from http://github.com/svnlabs/a2zVideoAPI 2. API require PHP with CURL extension.. Setup / Upload “api.php” to your web server 3. Modify “api.php” for API Video server … Read more