Locate phone location with GP Aloshbei location API and visualize with google maps API

We have built our main Aloashbei class in the previous post. Now we will extend it to locate any GrameenPhone number. But currently, as a developer you can only track your number for testing purpose.

File Structure:

  • class.Aloashbei.php
  • class.AloashbeiLBS.php
  • location.php
  • includes/WebService_Aloashbei_LBS_WS.wsdl

Read the rest of this entry »

PHP class for sending, receiving and checking SMS status with GrameenPhone’s Aloashbei API

I saw everyone is participating in the GrameenPhone Aloashbei API contest and it’s began and I am late :P . So why not doing something that makes other’s life easy? So I decided to make a PHP class to do that job for you. You don’t need to know how to work with SOAP. Just instantiate a class, set the parameter and send, VOILA!!!

With the Aloashbei SMS API, you can send SMS, Check the SMS status and receive SMS. You can track location of any GP mobile number with the Location Locator API. It will provide you the longitude and latitude of the phone numbers current position. You can send MMS with the MMS API. You can charge any user who buys any content through the Charging API.

So we are going to build php class that will do these thing easily. Here I will built the SMS class. We can send SMS to any number and if it’s successful, it will return us a message ID. With this message ID, we can check the status of that sent message. To make a complete Aloashbei API class, we’ll first make a basic class and will extend it for other purposes. So here is the basic class that we will extend. It’ll hold the values for setting up the variables and will set user/password initially.

The file Structure:

  • class.Aloashbei.php
  • class.AloashbeiSMS.php
  • sms.php
  • includes/WebService_GP_ADP_BizTalk_SMS_Orchestrations.wsdl

Read the rest of this entry »

Translate or convert wordpress date/time/comment number to Bangla digit

Today I worked with a wordpress site Bangladesh Linux Users Alliance, which is a complete Bangla language based site. You can translate with the Bangla language pack, but you can’t convert the English digits to it’s corresponding Bangla digit. So I visited the wordpress codex and found some filters that can do that job very easily.

Here is your function that will convert the digit

/**
 * This function converts all english number's to bangla number
 */
function make_bangla_number($str)
{
	$engNumber = array(1,2,3,4,5,6,7,8,9,0);
	$bangNumber = array('১','২','৩','৪','৫','৬','৭','৮','৯','০');
	$converted = str_replace($engNumber, $bangNumber, $str);

	return $converted;
}

Now we need to add some filters that will hook to this places and convert the digit’s to Bangla.

add_filter( 'get_the_time', 'make_bangla_number' );
add_filter( 'the_date', 'make_bangla_number' );
add_filter( 'get_the_date', 'make_bangla_number' );
add_filter( 'comments_number', 'make_bangla_number' );
add_filter( 'get_comment_date', 'make_bangla_number' );
add_filter( 'get_comment_time', 'make_bangla_number' );

Read the rest of this entry »

Installing hackintosh iATKOS v7 (Mac OS X leopard 10.5.8) on Dell Inspiron 1545 and my experience

Some month ago I was trying to install Hackintosh on my Dell Inspiron 1545. That was iDeneb DVD. I managed to install it in my laptop. But after installing from that DVD, I couldn’t boot into Mac. I was getting “boot error” message. In that time I was using windows 7 and didn’t know how to fix this issue. So my hackintosh exploration stopped.

Some days ago I managed another ISO of iATKOS v7 and burned it for testing for the second time. I found deviato’s tutorial from here and again installed it. While booting from the DVD I was getting some problems like kernel panic, it’s being hanged with some wired message. But again and again I was trying and finally able to see the installation window. Then I moved forward and opened the disk utility from the installation window. I created a 13GB partition for installing mac and formatted the drive in NTFS format before from GParted from my ubuntu 10.04 installation.

From the Mac disk utility I formatted my 13GB NTFS formatted drive in Mac OS Extended (Journaled) file system. Then I moved forward and installed the Mac OS X leopard successfully. After rebooting I got the same “boot error” message like my previous installation. Again I stopped here, I saw in some blogs to install patched grub2. As I don’t use windows in my laptop, I use ubuntu and the version is 10.04 (lucid lynx) and obviously I use grub2. My ubuntu grub was not there because I installed Mac and it removed my grub. So I booted into ubuntu with a flash USB drive (pen drive) and installed grub2 again to boot into my original installed ubuntu. Again rebooted and logged into my installed ubuntu and ran this command (sudo update-grub) to update my grub to see that if it finds the mac partition, it will be great. And I surprised to see that this update found the Mac installation and added an entry to my grub boot loader. I was really amazed at that time.
Read the rest of this entry »