<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tareq's Planet &#187; My Works</title>
	<atom:link href="http://tareq.wedevs.com/category/my-works/feed/" rel="self" type="application/rss+xml" />
	<link>http://tareq.wedevs.com</link>
	<description></description>
	<lastBuildDate>Sat, 14 Jan 2012 16:38:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>New plugin: WordPress User Frontend</title>
		<link>http://tareq.wedevs.com/2011/01/new-plugin-wordpress-user-frontend/</link>
		<comments>http://tareq.wedevs.com/2011/01/new-plugin-wordpress-user-frontend/#comments</comments>
		<pubDate>Sat, 08 Jan 2011 17:16:28 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[My Works]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[dashboard]]></category>
		<category><![CDATA[edit profile]]></category>
		<category><![CDATA[frontend]]></category>
		<category><![CDATA[posts]]></category>
		<category><![CDATA[profile]]></category>
		<category><![CDATA[restrict]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1281</guid>
		<description><![CDATA[Today I am coming with a new wordpress plugin, named &#8220;WordPress User Frontend&#8220;. Some of us want something like that the subscriber/contributor will not be able to go in the wordpress backend and everything these user can control will be done from wordpress frontend. Features: So here is my plugin that solves your problem. This [...]]]></description>
			<content:encoded><![CDATA[<p>Today I am coming with a new wordpress plugin, named &#8220;<strong>WordPress User Frontend</strong>&#8220;. Some of us want something like that the subscriber/contributor will not be able to go in the wordpress backend and everything these user can control will be done from wordpress frontend.</p>
<h3>Features:</h3>
<p>So here is my plugin that solves your problem. This features of this plugin in it&#8217;s <strong>version 0.2</strong> are follows:</p>
<ul>
<li>User can create a new post and edit from frontend</li>
<li>They can view their page in the custom dashboard</li>
<li>Users can edit their profile</li>
<li>Administrator can restrict any user level to access the wordpress backend (/wp-admin)</li>
<li>New posts status, submitted by users are configurable via admin panel. i.e. Published, Draft, Pending</li>
<li>Admin can configure to receive notification mail when the users creates a new post.</li>
<li>Configurable options if the user can edit or delete their posts.</li>
<li>Users can upload attachments from the frontend</li>
<li>Admins can manage their users from frontend</li>
<li>Pay per post or subscription on posting is possible</li>
</ul>
<p><span id="more-1281"></span></p>
<h3>Usage:</h3>
<ul>
<li>Create a new Page &#8220;New Post&#8221; and insert shorcode <strong>[wpuf_addpost] </strong>or for custom post type<strong> [wpuf_addpost post_type="event"]<br />
</strong></li>
<li>Create a new Page &#8220;Edit&#8221; for editing posts and insert shorcode <strong>[wpuf_edit]</strong></li>
<li>Create a new Page &#8220;Profile&#8221; for editing profile and insert shorcode <strong>[wpuf_editprofile]</strong></li>
<li>Create a new Page &#8220;Dashboard&#8221; and insert shorcode <strong>[wpuf_dashboard] </strong>or for custom post types<strong> [wpuf_dashboard post_type="event"]<br />
</strong></li>
<li>Correct the permalink structure of your wordpress installation</li>
<li>To show the subscription info, insert the shortcdoe `[wpuf_sub_info]`</li>
<li>To show the subscription packs, insert the shortcode `[wpuf_sub_pack]`</li>
<li>For subscription payment page, create a new page and insert the page ID in WP User frontend&#8217;s &#8220;Paypal Payment Page&#8221; option.</li>
<li>Done <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley colorbox-1281' /> </li>
</ul>
<h3>Download:</h3>
<div class="download"><strong>Download:</strong> <a title="Download the plugin from wordpress plugin repository" href="http://wordpress.org/extend/plugins/wp-user-frontend/" target="_blank">WP User Frontend</a></div>
<h3>Update:</h3>
<p>Version 0.2 released. (13 Jan, 2012)</p>
<h3>Changelog:</h3>
<p>Version &#8211; 0.2:</p>
<ol>
<li>Admin settings page has been improved</li>
<li>Header already sent warning messages has been fixed</li>
<li>Now you can add custom post meta from the settings page</li>
<li>A new pay per post and subscription based posting options has been introduced (Only paypal is supported now)</li>
<li>You can upload attachment with post</li>
<li>WYSIWYG editor has been added</li>
<li>You can add and manage your users from frontend now (only having the capability to edit_users )</li>
<li>Some action and filters has been added for developers to add their custom form elements and validation</li>
<li>Pagination added in post dashboard</li>
<li>You can use the form to accept &#8220;custom post type&#8221; posts. e.g: [wpuf_addpost post_type="event"]. It also applies for showing post on dashboard like &#8220;[wpuf_dashboard post_type="event"]&#8220;</li>
<li>Changing the form labels of the add post form is now possible from admin panel.</li>
<li>The edit post page setting is changed from URL to page select dropdown.</li>
<li>You can lock certain users from posting from their edit profile page.</li>
</ol>
<h3>Screenshot:</h3>
<div id="attachment_1282" class="wp-caption aligncenter" style="width: 310px"><a href="http://tareq.wedevs.com/wp-content/uploads/2011/01/wp-user-frontend-admin-options.png"><img class="size-medium wp-image-1282 colorbox-1281" title="wp-user-frontend-admin-options" src="http://tareq.wedevs.com/wp-content/uploads/2011/01/wp-user-frontend-admin-options-300x130.png" alt="wp-user-frontend-admin-options" width="300" height="130" /></a><p class="wp-caption-text">Admin Options</p></div>
<div id="attachment_1285" class="wp-caption aligncenter" style="width: 310px"><a href="http://tareq.wedevs.com/wp-content/uploads/2011/01/wp-user-frontend-edit-profile.png"><img class="size-medium wp-image-1285 colorbox-1281" title="wp-user-frontend-edit-profile" src="http://tareq.wedevs.com/wp-content/uploads/2011/01/wp-user-frontend-edit-profile-300x296.png" alt="wp-user-frontend-edit-profile" width="300" height="296" /></a><p class="wp-caption-text">Edit Profile</p></div>
<div id="attachment_1283" class="wp-caption aligncenter" style="width: 310px"><a href="http://tareq.wedevs.com/wp-content/uploads/2011/01/wp-user-frontend-dashboard.png"><img class="size-medium wp-image-1283 colorbox-1281" title="wp-user-frontend-dashboard" src="http://tareq.wedevs.com/wp-content/uploads/2011/01/wp-user-frontend-dashboard-300x98.png" alt="wp-user-frontend-dashboard" width="300" height="98" /></a><p class="wp-caption-text">Dashboard</p></div>
<div id="attachment_1284" class="wp-caption aligncenter" style="width: 310px"><a href="http://tareq.wedevs.com/wp-content/uploads/2011/01/wp-user-frontend-edit-posts.png"><img class="size-medium wp-image-1284 colorbox-1281" title="wp-user-frontend-edit-posts" src="http://tareq.wedevs.com/wp-content/uploads/2011/01/wp-user-frontend-edit-posts-300x216.png" alt="wp-user-frontend-edit-posts" width="300" height="216" /></a><p class="wp-caption-text">Edit Posts</p></div>
<h3>Project is now in Github</h3>
<p>The WP User Frontend plugin is now hosted in <a title="View the github repository" href="https://github.com/tareq1988/WP-User-Frontend" target="_blank">Github repositor</a>y. You can always find the newest fix and updates from the Github page. You can also contribute to this project if have some cool idea and will be very helpful for me too.</p>
]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2011/01/new-plugin-wordpress-user-frontend/feed/</wfw:commentRss>
		<slash:comments>264</slash:comments>
		</item>
		<item>
		<title>Simple server to server file downloader script</title>
		<link>http://tareq.wedevs.com/2010/12/simple-server-to-server-file-downloader-script/</link>
		<comments>http://tareq.wedevs.com/2010/12/simple-server-to-server-file-downloader-script/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 08:23:23 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[My Works]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[downloader]]></category>
		<category><![CDATA[fread]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1279</guid>
		<description><![CDATA[About a month ago I wrote a script for my own need. It can download files from another server to your server. I just wrote it for my own purpose and it&#8217;s pretty simple and stupid enough. But hey, it works This script has a form input field to make the operation simpler. The downloaded [...]]]></description>
			<content:encoded><![CDATA[<p>About a month ago I wrote a script for my own need. It can download files from another server to your server. I just wrote it for my own purpose and it&#8217;s pretty simple and stupid enough. But hey, it works <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley colorbox-1279' /> </p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
if (isset($_POST['sub']))
{
    if (filter_var($url = $_POST['url'], FILTER_VALIDATE_URL))
    {
        define('UPLOAD_DIR', dirname(__FILE__) . '/files/');
        $length = 5120;

        $handle = fopen($url, 'rb');
        $filename = UPLOAD_DIR . substr(strrchr($url, '/'), 1);
        $write = fopen($filename, 'w');

        while (!feof($handle))
        {
            $buffer = fread($handle, $length);
            fwrite($write, $buffer);
        }

        fclose($handle);
        fclose($write);
        echo &quot;&lt;h1&gt;File download complete&lt;/h1&gt;&quot;;
    }
    else
    {
        echo &quot;&lt;h2&gt;Invalid url&lt;/h2&gt;&quot;;
    }
}
?&gt;
&lt;form action=&quot;&quot; method=&quot;POST&quot;&gt;
    &lt;p&gt;
        &lt;label for=&quot;url&quot;&gt;Url:&lt;/label&gt;
        &lt;input type=&quot;text&quot; size=&quot;50&quot; name=&quot;url&quot; id=&quot;url&quot; /&gt;
    &lt;/p&gt;
    &lt;p&gt;
        &lt;input type=&quot;submit&quot; name=&quot;sub&quot; value=&quot;download&quot; /&gt;
    &lt;/p&gt;
&lt;/form&gt;
</pre>
<p>This script has a form input field to make the operation simpler. The downloaded files will be saved on a directory named <em>/files</em>. I am just sharing it, may be it will help you in anyways <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley colorbox-1279' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2010/12/simple-server-to-server-file-downloader-script/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Locate phone location with GP Aloshbei location API and visualize with google maps API</title>
		<link>http://tareq.wedevs.com/2010/09/locate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api/</link>
		<comments>http://tareq.wedevs.com/2010/09/locate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 11:20:57 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[My Works]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Aloashbei]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[Grameen Phone]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[location]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1265</guid>
		<description><![CDATA[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 So we have &#8220;class.Aloashbei.php&#8221; and &#8220;class.AloashbeiLBS.php&#8221;. Now we need to get the wsdl file. [...]]]></description>
			<content:encoded><![CDATA[<p>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 <em>your number</em> for testing purpose. </p>
<p><strong>File Structure:</strong></p>
<ul>
<li>class.Aloashbei.php</li>
<li>class.AloashbeiLBS.php</li>
<li>location.php</li>
<li>includes/WebService_Aloashbei_LBS_WS.wsdl</li>
</ul>
<p><span id="more-1265"></span></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

//file: class.AloashbeiLBS.php

include_once 'class.Aloashbei.php';

/**
 * Description of class
 *
 * @author Tareq Hasan
 * @link http://tareq.weDevs.com
 */
class AloashbeiLBS extends Aloashbei
{

    /**
     * The mobile number that to be located
     *
     * @var string
     */
    private $msisdn;

    /**
     * Set's user's user id and password
     *
     * @param string $user_id registered user id
     * @param string $password registered password
     */
    function __construct($user_id, $password)
    {
        parent::__construct($user_id, $password);

        $this-&gt;soap = new SoapClient('includes/WebService_Aloashbei_LBS_WS.wsdl');
    }

    /**
     * Retreives current mobile location
     *
     * @param string $number mobile number
     * @return object location details:
     */
    function getLocation($number)
    {
        $this-&gt;msisdn = $number;

        $this-&gt;auth = array(
            'registrationID' =&gt; $this-&gt;registrationID,
            'password' =&gt; $this-&gt;password,
            'msisdn' =&gt; $this-&gt;msisdn
        );

        $result = $this-&gt;soap-&gt;requestLocation(array('LBSRequest' =&gt; $this-&gt;auth));

        return $result;
    }

}
?&gt;
</pre>
<p>So we have &#8220;class.Aloashbei.php&#8221; and &#8220;class.AloashbeiLBS.php&#8221;. Now we need to get the wsdl file. Grab the file from <a href="https://www.aloashbei.com.bd/wiki/wsdl-links" target="_blank">here</a> and change the file with the help of the previous post instruction.</p>
<p><strong>Using the class:</strong></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

//file: location.php

include_once 'class.AloashbeiLBS.php';

$user_id = '********';
$password = '*******';
$dev_phone_no = '88017********';

$lbs = new AloashbeiLBS($user_id, $password);
try
{
    $result = $lbs-&gt;getLocation($number);

    echo $latitude = $result-&gt;LBSResponse-&gt;Latitude;
    echo $longitude = $result-&gt;LBSResponse-&gt;Longitude;
} catch (Exception $exc)
{
    var_dump($exc);
}
?&gt;
</pre>
<p>If that scripts runs successfully, you will get the longitude and latitude of your phone number. But currently GP&#8217;s server is down, so I was not able test it before posting. But this code should surely work fine.</p>
<p><strong>Visualize with google maps API:</strong><br />
We will pass the the longitude and latitude to the javascript variable, and it will show your current position graphically <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley colorbox-1265' /> </p>
<pre class="brush: xml; title: ; notranslate">

&lt;!-- file: location.php ---&gt;

&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;Aloashbei Location locator and visualize with google maps API: Tareq Hasan&lt;/title&gt;
        &lt;style type=&quot;text/css&quot;&gt;
            html { height: 100% ; text-align: center;}
            body { height: 100%; margin: 0px; padding: 0px }
            #map_canvas{
                width: 500px;
                height: 400px;
                margin: 10px auto;
                text-align: left;
            }
        &lt;/style&gt;
        &lt;script type=&quot;text/javascript&quot;&gt;
            function initialize()
            {
                var latitude = &lt;?php echo $latitude ?&gt;;
                var longitude = &lt;?php echo $longitude ?&gt;;

                var myLatlng = new google.maps.LatLng(latitude, longitude);

                var contentString = 'You are here, honey!!!' + '&lt;br&gt;' +
                    'Latitude: ' + latitude + '&lt;br&gt;' +
                    'Longitude: ' + longitude;
                var infowindow = new google.maps.InfoWindow({
                    content: contentString,
                    position: myLatlng
                });

                var myOptions = {
                    zoom: 12,
                    center: myLatlng,
                    mapTypeId: google.maps.MapTypeId.ROADMAP
                }

                var map = new google.maps.Map(document.getElementById(&quot;map_canvas&quot;), myOptions);

                infowindow.open(map);
            }

            function loadScript()
            {
                var script = document.createElement(&quot;script&quot;);
                script.type = &quot;text/javascript&quot;;
                script.src = &quot;http://maps.google.com/maps/api/js?sensor=false&amp;callback=initialize&quot;;
                document.body.appendChild(script);
            }

            window.onload = loadScript;
        &lt;/script&gt;

    &lt;/head&gt;
    &lt;body&gt;
        &lt;div id=&quot;map_canvas&quot;&gt;&lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>If everything goes right, you will see a page like this:<br />
<div id="attachment_1266" class="wp-caption aligncenter" style="width: 523px"><img src="http://tareq.wedevs.com/wp-content/uploads/2010/09/GP-LBS.png" alt="GP Aloashbei Location Locator API with google maps" title="GP LBS" width="513" height="410" class="size-full wp-image-1266 colorbox-1265" /><p class="wp-caption-text">GP Aloashbei Location Locator API with google maps</p></div></p>
<p>Happy locating phone&#8217;s and don&#8217;t get beat <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley colorbox-1265' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2010/09/locate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>PHP class for sending, receiving and checking SMS status with GrameenPhone&#8217;s Aloashbei API</title>
		<link>http://tareq.wedevs.com/2010/09/php-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api/</link>
		<comments>http://tareq.wedevs.com/2010/09/php-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 08:46:20 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[My Works]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Aloashbei]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[GP]]></category>
		<category><![CDATA[Grameen Phone]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[wsdl]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1263</guid>
		<description><![CDATA[I saw everyone is participating in the GrameenPhone Aloashbei API contest and it&#8217;s began and I am late . So why not doing something that makes other&#8217;s life easy? So I decided to make a PHP class to do that job for you. You don&#8217;t need to know how to work with SOAP. Just instantiate [...]]]></description>
			<content:encoded><![CDATA[<p>I saw everyone is participating in the GrameenPhone Aloashbei API contest and it&#8217;s began and I am late <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley colorbox-1263' /> . So why not doing something that makes other&#8217;s life easy? So I decided to make a PHP class to do that job for you. You don&#8217;t need to know how to work with SOAP. Just instantiate a class, set the parameter and send, VOILA!!!</p>
<p>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.</p>
<p>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&#8217;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&#8217;ll first make a basic class and will extend it for other purposes. So here is the basic class that we will extend. It&#8217;ll hold the values for setting up the variables and will set user/password initially.</p>
<p><strong>The file Structure:</strong></p>
<ul>
<li>class.Aloashbei.php</li>
<li>class.AloashbeiSMS.php</li>
<li>sms.php</li>
<li>includes/WebService_GP_ADP_BizTalk_SMS_Orchestrations.wsdl</li>
</ul>
<p><span id="more-1263"></span></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
//file: class.Aloashbei.php
/**
 * Main Aloashbei class that holds the variables
 *
 * @author Tareq Hasan
 * @example http://tareq.weDevs.com
 */
class Aloashbei
{

    /**
     * This will contain the SOAP object
     *
     * @var object
     */
    protected $soap;

    /**
     * This array will contain setup information
     *
     * @var array
     */
    protected $auth = array();

    /**
     * This ID will be created by each developer during the registration process.
     *
     * @var string
     */
    protected $registrationID;

    /**
     * Developer password
     *
     * @var string
     */
    protected $password;

    /**
     * In “88017xxxxxxxx” format. Always will be developers registered MSISDN.
     *
     * @var string
     */
    protected $sourceMsisdn;

    /**
     * Destination MSISDN  number. The number will be in “88017xxxxxxxx” format.
     *
     * @var string
     */
    protected $destinationMsisdn;

    /**
     * The following value should be populated in this parameter – 7424.
     *
     * @var integer
     */
    protected $smsPort;

    /**
     * Message Type accroding to content.
     *
     * @var integer
     */
    protected $msgType;

    /**
     * Charge amount for sending the SMS. Only whole numbers can be charged and
     * the amount must be provided in double format (i.e 2.00).
     *
     * @var double
     */
    protected $charge;

    /**
     * This must be the registered number of the developer.
     * @var string
     */
    protected $chargedParty;

    /**
     * The following value should be populated in this parameter – gpgp_psms.
     *
     * @var string
     */
    protected $contentArea;

    /**
     * Actual message.
     *
     * @var string
     */
    protected $msgContent;

    /**
     * Set's user's user id and password
     *
     * @param string $user_id registered user id
     * @param string $password registered password
     */
    function __construct($user_id, $password)
    {
        $this-&gt;registrationID = $user_id;
        $this-&gt;password = $password;
    }
}
?&gt;
</pre>
<p>We will extend that class to send SMS. Here is the SMS class that will extend the Aloashbei class</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
//file: class.AloashbeiSMS.php
include_once 'class.Aloashbei.php';

/**
 * Send, Receive and Check SMS status through GrameenPhone's Aloashbei API
 *
 * @author Tareq Hasan
 * @example http://tareq.weDevs.com
 */
class AloashbeiSMS extends Aloashbei
{

    /**
     * Constructor for setting up the class
     *
     * @param string $user_id registered user id
     * @param string $password registered account password
     * @param string $dev_phone test phone number
     */
    function __construct($user_id, $password, $dev_phone)
    {
        parent::__construct($user_id, $password);

        $this-&gt;sourceMsisdn = $dev_phone;
        $this-&gt;smsPort = 7424;
        $this-&gt;chargedParty = $dev_phone;
        $this-&gt;contentArea = 'gpgp_psms';

        $this-&gt;soap = new SoapClient('includes/WebService_GP_ADP_BizTalk_SMS_Orchestrations.wsdl');
    }

    /**
     * Set's message parameters
     *
     * @param string $destination message destination phone number
     * @param string $msg message content
     * @param integer $type type of the message. e.g: 1 = ringtone, 2 = logo, 3 = wap push, 4 = text
     * @param double $charge charge amount of the message
     */
    public function setSMS($destination, $msg, $type, $charge)
    {
        $this-&gt;destinationMsisdn = $destination;
        $this-&gt;msgContent = $msg;
        $this-&gt;msgType = $type;
        $this-&gt;charge = $charge;

        $this-&gt;auth = array(
            'registrationID' =&gt; $this-&gt;registrationID,
            'password' =&gt; $this-&gt;password,
            'sourceMsisdn' =&gt; $this-&gt;sourceMsisdn,
            'destinationMsisdn' =&gt; $this-&gt;destinationMsisdn,
            'smsPort' =&gt; $this-&gt;smsPort,
            'msgType' =&gt; $this-&gt;msgType,
            'charge' =&gt; $this-&gt;charge,
            'chargedParty' =&gt; $this-&gt;chargedParty,
            'contentArea' =&gt; $this-&gt;contentArea,
            'msgContent' =&gt; $this-&gt;msgContent
        );
    }

    /**
     * Sends the short message
     *
     * @return object send status information: status, msgID
     */
    public function send()
    {
        $result = $this-&gt;soap-&gt;sendSMS(array('SendSMSRequest' =&gt; $this-&gt;auth));

        return $result;
    }

    /**
     * Retreive SMS with message ID
     *
     * @param string $msg_id sent message id
     * @return object received sms details: msgID, senderMSISDN, timeStamp, sourcePort, msgContent

     */
    public function getSMS($msg_id)
    {
        $this-&gt;auth = array(
            'registrationID' =&gt; $this-&gt;registrationID,
            'password' =&gt; $this-&gt;password,
            'smsPort' =&gt; $this-&gt;smsPort,
            'msgID' =&gt; $msg_id
        );

        $result = $this-&gt;soap-&gt;getReceivedSMS(array('ReceiveSMSRequest' =&gt; $this-&gt;auth));

        return $result;
    }

    /**
     * Retrieve the SMS's current status
     *
     * @param string $msg_id sent message id
     * @return object status sms details: deliveryStatus
     */
    public function getStatus($msg_id)
    {
        $this-&gt;auth = array(
            'registrationID' =&gt; $this-&gt;registrationID,
            'password' =&gt; $this-&gt;password,
            'msgID' =&gt; $msg_id
        );

        $result = $this-&gt;soap-&gt;getSMSDeliveryStatus(array('SMSStatusRequest' =&gt; $this-&gt;auth));

        return $result;
    }

}
?&gt;
</pre>
<p><strong>Preparing the WSDL file:</strong><br />
I have placed the main soap file &#8220;WebService_GP_ADP_BizTalk_SMS_Orchestrations.wsdl&#8221; to the &#8220;/includes&#8221; folder. You can grab the file from <a href="https://www.aloashbei.com.bd/wiki/wsdl-links" target="_blank">here</a>. Be fore using that SMS WSDL file, you need to change 2 lines from that file.</p>
<ul>
<li>At first save the WSDL file, then go to the bottom of that file. Replace &#8220;<em>http://192.168.100.169/API/GP.ADP.BizTalk.SMS.Orchestrations/WebService_GP_ADP_BizTalk_SMS_Orchestrations.asmx</em>&#8221;  by &#8220;<em>https://www.aloashbei.com.bd/API/GP.ADP.BizTalk.SMS.Orchestrations/WebService_GP_ADP_BizTalk_SMS_Orchestrations.asmx</em>&#8220;.</li>
<li>Then save the file. The location of the file will be &#8220;includes/WebService_GP_ADP_BizTalk_SMS_Orchestrations.wsdl&#8221;.</li>
</ul>
<p>So you are done to setup all the things. It&#8217;s time to send free SMS, but wait, don&#8217;t hurry, there is a limitation for sending SMS <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley colorbox-1263' /> </p>
<p><strong>Working with the Class:</strong><br />
Lets create a page &#8220;sms.php&#8221;.</p>
<pre class="brush: php; title: ; notranslate">
//file: sms.php
include_once 'class.AloashbeiSMS.php';

$user_id = '*******'; //your registered user id
$password = '********'; // your account password
$dev_phone = '88017********'; //your registered phone number
$destination = '88017********'; // destination phone number
$msg = 'Test sms message from GP Aloashbei API'; //message to send
$type = 4; //type of the message. e.g: 1 = ringtone, 2 = logo, 3 = wap push, 4 = text
$charge = 0.00; //sms charge

//setup constructor
$sms = new AloashbeiSMS($user_id, $password, $dev_phone);

//setup sms
$sms-&gt;setSMS($destination, $msg, $type, $charge);

//send sms
$result = $sms-&gt;send();

if ($result-&gt;SendSMSResponse-&gt;status == 'OK')
{
    echo '&lt;h2&gt;Message Sent&lt;/h2&gt;';
    echo 'Message ID: ' . $result-&gt;SendSMSResponse-&gt;msgID;
    echo '&lt;hr&gt;';
}
else
{
    echo &quot;&lt;h1&gt;&quot; . $result-&gt;SendSMSResponse-&gt;status . &quot;&lt;/h1&gt;&quot;;
}
</pre>
<p>If you are familiar with PHP and OOP, you know whats is going, right? <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley colorbox-1263' /> </p>
<p>If we are successful to send sms, it will print the sent message ID, otherwise it will show the error message came through the API.</p>
<p>Now, if we need to check the status of the message, we can do it very simply. Here is the complete code -</p>
<pre class="brush: php; title: ; notranslate">
include_once 'class.AloashbeiSMS.php';

$sms = new AloashbeiSMS($user_id, $password, $dev_phone);

$status = $sms-&gt;getStatus($msg_id);
echo 'Status: ' . $status-&gt;SMSStatusResponse-&gt;deliveryStatus;
</pre>
<p>I am not clear about the receive message service usage, but yeah, although you can still do that with this class <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley colorbox-1263' /> </p>
<pre class="brush: php; title: ; notranslate">
include_once 'class.AloashbeiSMS.php';

$sms = new AloashbeiSMS($user_id, $password, $dev_phone);
$receive = $sms-&gt;getSMS($msg_id);

echo 'Sender: ' . $receive-&gt;ReceiveSMSResponse-&gt;senderMSISDN . '&lt;br&gt;';
echo 'Timestamp: ' . $receive-&gt;ReceiveSMSResponse-&gt;timeStamp . '&lt;br&gt;';
echo 'Source Port: ' . $receive-&gt;ReceiveSMSResponse-&gt;sourcePort . '&lt;br&gt;';
echo 'Message: ' . $receive-&gt;ReceiveSMSResponse-&gt;msgContent . '&lt;br&gt;';
</pre>
<p>May be I&#8217;m not good to describe codes, but this post might help you <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley colorbox-1263' /> </p>
<p><strong>Resources:</strong></p>
<ul>
<li><a href="https://www.aloashbei.com.bd/wiki/api-highlights" target="_blank">Aloshebei API highlights</a></li>
<li><a href="https://www.aloashbei.com.bd/wiki/wsdl-links" target="_blank">WSDL links</a></li>
<li><a href="https://www.aloashbei.com.bd/wiki/tutorials" target="_blank">Tutorials</a></li>
<li><a href="https://www.aloashbei.com.bd/wiki/api-specifications" target="_blank">API specification</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2010/09/php-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin: GAF affiliate widget</title>
		<link>http://tareq.wedevs.com/2010/05/wordpress-plugin-gaf-affiliate-widget/</link>
		<comments>http://tareq.wedevs.com/2010/05/wordpress-plugin-gaf-affiliate-widget/#comments</comments>
		<pubDate>Mon, 31 May 2010 14:40:11 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[My Works]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[affiliate]]></category>
		<category><![CDATA[freelancer.com]]></category>
		<category><![CDATA[gaf]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1247</guid>
		<description><![CDATA[Hello there, another wp plugin from me . I was thinking to be a Freelancer.com affiliate (previous GetAFreelancer) and  looking for some wordpress widget as I want to show the links in my blog sidebar. I found a plugin built by Masnun bro, but it gets related projects from freelancer.com according to your post and [...]]]></description>
			<content:encoded><![CDATA[<p>Hello there, another wp plugin from me <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley colorbox-1247' />  . I was thinking to be a <a href="http://Freelancer.com" target="_blank">Freelancer.com</a> affiliate (previous <a href="http://GetAFreelancer.com" target="_blank">GetAFreelancer</a>) and  looking for some wordpress widget as I want to show the links in my blog sidebar. I found a plugin built by <a href="http://masnun.com/blog/2009/11/21/my-first-wordpress-plugin-gaf-text-link/" target="_blank">Masnun</a> bro, but it gets related projects from freelancer.com according to your post and shows below of your post . So i thought, why i don&#8217;t I built one before anyone creates before me? <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley colorbox-1247' />  . So here is the plugin screenshot:</p>
<div id="attachment_1248" class="wp-caption aligncenter" style="width: 310px"><a href="http://tareq.wedevs.com/wp-content/uploads/2010/05/gaf_widget.jpg"><img class="size-full wp-image-1248 colorbox-1247" title="gaf_widget" src="http://tareq.wedevs.com/wp-content/uploads/2010/05/gaf_widget.jpg" alt="gaf_widget" width="300" height="371" /></a><p class="wp-caption-text">Widget setting screenshot</p></div>
<p>So i don&#8217;t need to describe what to do after installing the plugin, right? It&#8217;ll show the selected links to your sidebar like this:</p>
<div id="attachment_1249" class="wp-caption aligncenter" style="width: 324px"><a href="http://tareq.wedevs.com/wp-content/uploads/2010/05/gaf_sidebar_display.jpg"><img class="size-full wp-image-1249 colorbox-1247" title="gaf_sidebar_display" src="http://tareq.wedevs.com/wp-content/uploads/2010/05/gaf_sidebar_display.jpg" alt="" width="314" height="274" /></a><p class="wp-caption-text">Displaying links from freelancer.com</p></div>
<div class="download"><b> Download:</b> <a href="http://tareq.wedevs.com/downloads/gaf-affiliate-widget.zip" title="Downloaded 259 times">GAF affiliate plugin for wordpress</a></div>
<p>So why don&#8217;t you add this plugin to your blog and make some money? <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley colorbox-1247' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2010/05/wordpress-plugin-gaf-affiliate-widget/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>punBB extension: Post Share</title>
		<link>http://tareq.wedevs.com/2010/05/punbb-extension-post-share/</link>
		<comments>http://tareq.wedevs.com/2010/05/punbb-extension-post-share/#comments</comments>
		<pubDate>Tue, 11 May 2010 17:18:04 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[My Works]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[punBB]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[post share]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1243</guid>
		<description><![CDATA[Hey folks, in a short time i&#8217;ve made some punbb extension. Here is another, it&#8217;s for sharing post. It inserts share button in every post, here is the screenshot: You will find the configuration at Administration → Settings → Features Enjoy]]></description>
			<content:encoded><![CDATA[<div id="attachment_1245" class="wp-caption aligncenter" style="width: 303px"><a href="http://tareq.wedevs.com/wp-content/uploads/2010/05/punbb_share_extension2.png"><img class="size-full wp-image-1245 colorbox-1243" title="punbb_share_extension2" src="http://tareq.wedevs.com/wp-content/uploads/2010/05/punbb_share_extension2.png" alt="" width="293" height="81" /></a><p class="wp-caption-text">Showing links in every post</p></div>
<p style="text-align: center;">Hey folks, in a short time i&#8217;ve made some punbb extension. Here is another, it&#8217;s for sharing post. It inserts share button in every post, here is the screenshot:</p>
<p>You will find the configuration at <strong>Administration → Settings →  Features</strong></p>
<div id="attachment_1244" class="wp-caption aligncenter" style="width: 497px"><a href="http://tareq.wedevs.com/wp-content/uploads/2010/05/punbb_share_extension.png"><img class="size-full wp-image-1244 colorbox-1243" title="punbb_share_extension" src="http://tareq.wedevs.com/wp-content/uploads/2010/05/punbb_share_extension.png" alt="" width="487" height="111" /></a><p class="wp-caption-text">Administration Area</p></div>
<p style="text-align: center;">
<div class="download"><b> Download:</b> <a href="http://tareq.wedevs.com/downloads/share.zip" title="Downloaded 429 times">punBB share extension</a></div>
<p>Enjoy <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley colorbox-1243' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2010/05/punbb-extension-post-share/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>punBB extension: We miss you!</title>
		<link>http://tareq.wedevs.com/2010/05/punbb-extension-we-miss-you/</link>
		<comments>http://tareq.wedevs.com/2010/05/punbb-extension-we-miss-you/#comments</comments>
		<pubDate>Sun, 09 May 2010 13:29:17 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[My Works]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[punBB]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[miss_you]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1238</guid>
		<description><![CDATA[Just wrote a punBB plugin for Projanmo Forum and now sharing with the community. The plugin describes it&#8217;s uses. You will find the configuration at Administration → Settings → Features Here is the screenshot: Version: 0.1 Version: 0.2 Changlog: * added plugin &#8220;active / inactive&#8221; feature, defult mode is set to &#8220;inactive&#8221; * added plugin [...]]]></description>
			<content:encoded><![CDATA[<p>Just wrote a <a href="http://punbb.informer.com" target="_blank">punBB</a> plugin for <a href="http://forum.projanmo.com" target="_blank">Projanmo Forum</a> and now sharing with the community. The plugin describes it&#8217;s uses. You will find the configuration at <strong>Administration → Settings → Features</strong> Here is the screenshot:</p>
<p><a href="http://tareq.wedevs.com/wp-content/uploads/2010/05/miss_you_punbb.png"><img class="aligncenter size-full wp-image-1239 colorbox-1238" title="miss_you_punbb" src="http://tareq.wedevs.com/wp-content/uploads/2010/05/miss_you_punbb.png" alt="" width="703" height="381" /></a></p>
<p>Version: 0.1<br />
<div class="download"><b> Download:</b> <a href="http://tareq.wedevs.com/downloads/we_miss_you.zip" title="Downloaded 260 times">We miss you</a></div></p>
<p>Version: 0.2<br />
Changlog:<br />
* added plugin &#8220;active / inactive&#8221; feature, defult mode is set to &#8220;inactive&#8221;<br />
* added plugin execution duration configuraton, it was executing in every page load on the previous version<br />
<div class="download"><b> Download:</b> <a href="http://tareq.wedevs.com/downloads/we_miss_you-v-0.2.zip" title="Downloaded 85 times">We miss you (Version 0.2)</a></div></p>
<p>Requesting bug report <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley colorbox-1238' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2010/05/punbb-extension-we-miss-you/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>punBB extension: Login with ID</title>
		<link>http://tareq.wedevs.com/2010/05/punbb-extension-login-with-id/</link>
		<comments>http://tareq.wedevs.com/2010/05/punbb-extension-login-with-id/#comments</comments>
		<pubDate>Sun, 09 May 2010 13:26:23 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[My Works]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[punBB]]></category>
		<category><![CDATA[extension]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1241</guid>
		<description><![CDATA[Just wrote an another punBB plugin for Projanmo Forum. In normal uses, everyone sign&#8217;s in with username and password. But for a special purpose, i needed to login with user ID and password. Because, when the username is in a complex script language like Bangla and you want to login from the mobile and you [...]]]></description>
			<content:encoded><![CDATA[<p>Just wrote an another <a href="http://punbb.informer.com" target="_blank">punBB</a> plugin for <a href="http://forum.projanmo.com" target="_blank">Projanmo Forum</a>.</p>
<p>In normal uses, everyone sign&#8217;s in with username and password. But for a special purpose, i needed to login with user ID and password. Because, when the username is in a complex script language like Bangla and you want to login from the mobile and you don&#8217;t have Bangla writing system in your mobile, this feature comes in action.</p>
<p><strong>This extension is written for mobile users actually.</strong> When you will visit the forum from mobile, you will be redirected to the login screen containing user ID and password.</p>
<p><a href="http://tareq.wedevs.com/wp-content/uploads/2010/05/login_with_id.png"><img class="aligncenter size-full wp-image-1242 colorbox-1241" title="login_with_id" src="http://tareq.wedevs.com/wp-content/uploads/2010/05/login_with_id.png" alt="" width="368" height="88" /></a></p>
<div class="download"><b> Download:</b> <a href="http://tareq.wedevs.com/downloads/login_with_id.zip" title="Downloaded 620 times">Login with ID</a></div>
<p>Enjoy!!! <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley colorbox-1241' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2010/05/punbb-extension-login-with-id/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bangla date as a PHP class</title>
		<link>http://tareq.wedevs.com/2010/04/bangla-date-as-a-php-class/</link>
		<comments>http://tareq.wedevs.com/2010/04/bangla-date-as-a-php-class/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 23:48:47 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[My Works]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Bangla]]></category>
		<category><![CDATA[bangla date]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[phpclassess.org]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1234</guid>
		<description><![CDATA[I have worked with Bangla date a long time ago. The first initiative was to make a extension for forum engine punBB. After that, i made a javascript widget to display Bangla date in any site. The third initiative was to make a facebook application that shows current Bangla date to your facebook profile. I [...]]]></description>
			<content:encoded><![CDATA[<p>I have worked with Bangla date a long time ago. The first initiative was to make a <a href="http://tareq.wedevs.com/2009/04/punbb-132-extension-bangla-date-%e0%a6%ac%e0%a6%99%e0%a7%8d%e0%a6%97%e0%a6%be%e0%a6%ac%e0%a7%8d%e0%a6%a6/" target="_blank">extension</a> for forum engine <a href="http://punbb.informer.com" target="_blank">punBB</a>. After that, i made a javascript widget to display <a href="http://tareq.wedevs.com/2009/05/%e0%a6%af%e0%a7%87-%e0%a6%95%e0%a7%8b%e0%a6%a8-%e0%a6%b8%e0%a6%be%e0%a6%87%e0%a6%9f%e0%a7%87-%e0%a6%a6%e0%a7%87%e0%a6%96%e0%a6%be%e0%a6%a8-%e0%a6%ac%e0%a6%be%e0%a6%82%e0%a6%b2%e0%a6%be-%e0%a6%a4/" target="_blank">Bangla date in any site</a>. The third initiative was to make a <a href="http://apps.facebook.com/bangladate/" target="_blank">facebook application</a> that shows current Bangla date to your facebook profile.</p>
<p>I always wanted to publish this as a PHP Class but never got that chance to do so. After a long time i worked with Bangla date today and finally created a PHP Class to use it anywhere by anyone. Sorry for the late.</p>
<p><strong>Usage:</strong></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
include_once 'class.banglaDate.php';
$bn_date = new BanglaDate(time());
$date = $bn_date-&gt;get_date();
?&gt;
</pre>
<p>You will get an array of converted date in Bangla.</p>
<blockquote><p>A few things needed to know. Bangla date counted or changes after the sun rise. That means, where English date changes at 12&#8242;O clock at the night, Bangla date changes at the morning after the sunrise.</p></blockquote>
<p><strong>Class Constructor:</strong><br />
This class constructor has 2 parameters. <strong>The first one</strong> in timestamp and the <strong>second one</strong> is the hour of changing the date. If you want to change the Bangla date like English at 12&#8217;0 clock at the night, you should use <code>$bn_date = new BanglaDate(time(), 0)</code>. But if you want to change the date at 6&#8242;O clock at the morning, use as <code>$bn_date = new BanglaDate(time(), 6)</code>. If you don&#8217;t pass the second parameter, the default value is 6. Use as you like.</p>
<p>After Creating the class object, you can set another date using <code>set_time()</code> like <code>$bn_date-&gt;set_time(time(), 4);</code></p>
<div class="download"><b> Download:</b> <a href="http://tareq.wedevs.com/downloads/class.banglaDate.zip" title="Downloaded 440 times">Download Bangla Date Class</a></div>
<p>Bangla Date class on <strong><a href="http://www.phpclasses.org/browse/package/6120.html">PHPClasses.org</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2010/04/bangla-date-as-a-php-class/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Grab your Google Buzz Status</title>
		<link>http://tareq.wedevs.com/2010/02/grab-your-google-buzz-status/</link>
		<comments>http://tareq.wedevs.com/2010/02/grab-your-google-buzz-status/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 18:04:48 +0000</pubDate>
		<dc:creator>Tareq</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[My Works]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Buzz]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Status]]></category>

		<guid isPermaLink="false">http://tareq.wedevs.com/?p=1210</guid>
		<description><![CDATA[Here&#8217;s how you can get your google buzz status with php. Just put your google username at the right place and do whatever you want. We have used simpleXML to parse the google&#8217;s RSS feed for every user.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how you can get your google buzz status with php. Just put your google username at the right place and do whatever you want.<br />
We have used simpleXML to parse the google&#8217;s RSS feed for every user. <img src='http://tareq.wedevs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley colorbox-1210' /> </p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
$user = &quot;&lt;username&gt;&quot;;
$url = &quot;http://buzz.googleapis.com/feeds/&quot;.$user.&quot;/public/posted&quot;;
$data = file_get_contents($url);
$xml = new SimpleXMLElement($data);

$status = $xml-&gt;entry[0]-&gt;summary;
$time = date('D j M Y g:i a', strtotime($xml-&gt;entry[0]-&gt;published));
echo &quot;Status: $status &lt;br /&gt;&quot;;
echo &quot;Time: $time&quot;;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tareq.wedevs.com/2010/02/grab-your-google-buzz-status/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

