Tag Archives: php

Automated MySQL Database Backup System

I just finished writing a tool to automate mysql database backup. It dumps the configured mysql database, zips the SQL file into a TGZ archive and emails the attachment to a predefined email address. Download: http://masnun.googlecode.com/files/sqlbackup.zip What you need to … Continue reading

Posted in Blog Post | Tagged , | 1 Comment

Coupling Zend Framework with CodeIgniter

CodeIgniter is a super cool web application framework for PHP. It is lightweight and lets you get the jobs done in a fashion. It is the first framework I have used and I am still using it. On the other … Continue reading

Posted in Blog Post | Tagged , | 13 Comments

CodeIgniter Code Completion with the Netbeans IDE for PHP

CodeIgniter is my favorite web application framework for PHP and Netbeans is the IDE I use for all sorts of web development. The latest version of Netbeans IDE (6.9) has support for both Symfony and Zend Framework. But it still … Continue reading

Posted in Blog Post | Tagged , | 12 Comments

Changing Font Style in PHP Generated Image

To change the font style, you need to use different fonts. You can use the imagettftext() function to draw text on a php generated image using GD. Here’s a code snippet: <?php header(’Content-type: image/png’); $im = imagecreatetruecolor(400, 300); $white = … Continue reading

Posted in Blog Post | Tagged | Leave a comment

Using the Facebook Graph API

I caught viral fever and decided to take the day off from work. To pass my leisure I decided to play with the Facebook APIs. I noticed that Facebook Platform has changed a lot. They have released the new “php-sdk” … Continue reading

Posted in Blog Post | Tagged , | 9 Comments

Setting Up Twitter Bots with OAuth

Twitter has decided to kill Basic Authentication on the Twitter API from June 30. They have setup a nice website at http://www.countdowntooauth.com/ to let you all know and help you migrate your apps to use the OAuth OAuth is cool. … Continue reading

Posted in Blog Post | Tagged , , | 33 Comments

Using Gedit as a PHP IDE

I’ve been using Ubuntu 9.04 as my primary OS for a while now. I love the power and flexibility of this free and open source OS. Besides PHP, I code Python mainly. I use the Netbeans IDE for PHP and … Continue reading

Posted in Blog Post | Tagged , | 5 Comments

Power of PHP: Resizing Images on Command Line

I’m too busy to explain the script now. In short, it scans the current directory for all the JPG images and converts them into smaller image files hardly compromising the quality. I managed to convert a 211 MB album into … Continue reading

Posted in Blog Post | Tagged | 1 Comment

Sending SMS With AloAshbei Platform (GP APIs) and PHP

Here’s a working example of Grameen Phone’s AloAshbei Platform.   <?php /* * Demo of the SMS API * Author: maSnun * URL: http://masnun.com */     // I hosted the WSDL on my own host $soap = new SoapClient("http://masnun.com/wsdl/wsdl.php"); … Continue reading

Posted in Blog Post | Tagged | 2 Comments

A reflect() Function For Quick Reflection in PHP

The Reflection API is the perfect way to reverse engineer and inspect php objects and functions. I have written a function to quickly pass params to the Reflection API and get things done. Here’s the source codes:   <?php   … Continue reading

Posted in Blog Post | Tagged | 1 Comment