<?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; API</title>
	<atom:link href="http://tareq.wedevs.com/category/api/feed/" rel="self" type="application/rss+xml" />
	<link>http://tareq.wedevs.com</link>
	<description></description>
	<lastBuildDate>Wed, 08 Sep 2010 11:29:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<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 &#60;?php //file: class.AloashbeiLBS.php include_once 'class.Aloashbei.php'; /** * Description of class * * @author Tareq [...]]]></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>
<pre class="brush: php;">
&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><span id="more-1265"></span><br />
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;">
&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' /> </p>
<pre class="brush: xml;">

&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" /><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' /> </p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F&amp;title=Locate%20phone%20location%20with%20GP%20Aloshbei%20location%20API%20and%20visualize%20with%20google%20maps%20API&amp;bodytext=We%20have%20built%20our%20main%20Aloashbei%20class%20in%20the%20previous%20post.%20Now%20we%20will%20extend%20it%20to%20locate%20any%20GrameenPhone%20number.%20But%20currently%2C%20as%20a%20developer%20you%20can%20only%20track%20your%20number%20for%20testing%20purpose.%20%0D%0A%0D%0AFile%20Structure%3A%0D%0A%0D%0A%09class.Aloashbei.php%0D%0A%09clas" title="Digg"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F&amp;title=Locate%20phone%20location%20with%20GP%20Aloshbei%20location%20API%20and%20visualize%20with%20google%20maps%20API&amp;notes=We%20have%20built%20our%20main%20Aloashbei%20class%20in%20the%20previous%20post.%20Now%20we%20will%20extend%20it%20to%20locate%20any%20GrameenPhone%20number.%20But%20currently%2C%20as%20a%20developer%20you%20can%20only%20track%20your%20number%20for%20testing%20purpose.%20%0D%0A%0D%0AFile%20Structure%3A%0D%0A%0D%0A%09class.Aloashbei.php%0D%0A%09clas" title="del.icio.us"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F&amp;t=Locate%20phone%20location%20with%20GP%20Aloshbei%20location%20API%20and%20visualize%20with%20google%20maps%20API" title="Facebook"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F&amp;title=Locate%20phone%20location%20with%20GP%20Aloshbei%20location%20API%20and%20visualize%20with%20google%20maps%20API&amp;annotation=We%20have%20built%20our%20main%20Aloashbei%20class%20in%20the%20previous%20post.%20Now%20we%20will%20extend%20it%20to%20locate%20any%20GrameenPhone%20number.%20But%20currently%2C%20as%20a%20developer%20you%20can%20only%20track%20your%20number%20for%20testing%20purpose.%20%0D%0A%0D%0AFile%20Structure%3A%0D%0A%0D%0A%09class.Aloashbei.php%0D%0A%09clas" title="Google Bookmarks"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F&amp;title=Locate%20phone%20location%20with%20GP%20Aloshbei%20location%20API%20and%20visualize%20with%20google%20maps%20API&amp;source=Tareq%27s+Planet+&amp;summary=We%20have%20built%20our%20main%20Aloashbei%20class%20in%20the%20previous%20post.%20Now%20we%20will%20extend%20it%20to%20locate%20any%20GrameenPhone%20number.%20But%20currently%2C%20as%20a%20developer%20you%20can%20only%20track%20your%20number%20for%20testing%20purpose.%20%0D%0A%0D%0AFile%20Structure%3A%0D%0A%0D%0A%09class.Aloashbei.php%0D%0A%09clas" title="LinkedIn"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F&amp;title=Locate%20phone%20location%20with%20GP%20Aloshbei%20location%20API%20and%20visualize%20with%20google%20maps%20API" title="Live"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F&amp;title=Locate%20phone%20location%20with%20GP%20Aloshbei%20location%20API%20and%20visualize%20with%20google%20maps%20API&amp;body=We%20have%20built%20our%20main%20Aloashbei%20class%20in%20the%20previous%20post.%20Now%20we%20will%20extend%20it%20to%20locate%20any%20GrameenPhone%20number.%20But%20currently%2C%20as%20a%20developer%20you%20can%20only%20track%20your%20number%20for%20testing%20purpose.%20%0D%0A%0D%0AFile%20Structure%3A%0D%0A%0D%0A%09class.Aloashbei.php%0D%0A%09clas" title="Ping.fm"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F&amp;title=Locate%20phone%20location%20with%20GP%20Aloshbei%20location%20API%20and%20visualize%20with%20google%20maps%20API" title="Reddit"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Locate%20phone%20location%20with%20GP%20Aloshbei%20location%20API%20and%20visualize%20with%20google%20maps%20API&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F" title="Slashdot"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F&amp;title=Locate%20phone%20location%20with%20GP%20Aloshbei%20location%20API%20and%20visualize%20with%20google%20maps%20API" title="StumbleUpon"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F" title="Technorati"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F&amp;t=Locate%20phone%20location%20with%20GP%20Aloshbei%20location%20API%20and%20visualize%20with%20google%20maps%20API&amp;s=We%20have%20built%20our%20main%20Aloashbei%20class%20in%20the%20previous%20post.%20Now%20we%20will%20extend%20it%20to%20locate%20any%20GrameenPhone%20number.%20But%20currently%2C%20as%20a%20developer%20you%20can%20only%20track%20your%20number%20for%20testing%20purpose.%20%0D%0A%0D%0AFile%20Structure%3A%0D%0A%0D%0A%09class.Aloashbei.php%0D%0A%09clas" title="Tumblr"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Locate%20phone%20location%20with%20GP%20Aloshbei%20location%20API%20and%20visualize%20with%20google%20maps%20API&amp;body=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F" title="email"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.netvibes.com/share?title=Locate%20phone%20location%20with%20GP%20Aloshbei%20location%20API%20and%20visualize%20with%20google%20maps%20API&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F" title="Netvibes"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F&amp;partner=sociable" title="PDF"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://tareq.wedevs.com/feed/" title="RSS"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Locate%20phone%20location%20with%20GP%20Aloshbei%20location%20API%20and%20visualize%20with%20google%20maps%20API%20-%20http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Flocate-phone-location-with-gp-aloshbei-location-api-and-visualize-with-google-maps-api%2F" title="Twitter"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></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>1</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' /> . 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>
<pre class="brush: php;">
&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<span id="more-1263"></span></p>
<pre class="brush: php;">
&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' /> </p>
<p><strong>Working with the Class:</strong><br />
Lets create a page &#8220;sms.php&#8221;.</p>
<pre class="brush: php;">
//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' /> </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;">
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' /> </p>
<pre class="brush: php;">
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' /> </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>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F&amp;title=PHP%20class%20for%20sending%2C%20receiving%20and%20checking%20SMS%20status%20with%20GrameenPhone%27s%20Aloashbei%20API&amp;bodytext=I%20saw%20everyone%20is%20participating%20in%20the%20GrameenPhone%20Aloashbei%20API%20contest%20and%20it%27s%20began%20and%20I%20am%20late%20%3AP.%20So%20why%20not%20doing%20something%20that%20makes%20other%27s%20life%20easy%3F%20So%20I%20decided%20to%20make%20a%20PHP%20class%20to%20do%20that%20job%20for%20you.%20You%20don%27t%20need%20to%20know%20how%20to" title="Digg"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F&amp;title=PHP%20class%20for%20sending%2C%20receiving%20and%20checking%20SMS%20status%20with%20GrameenPhone%27s%20Aloashbei%20API&amp;notes=I%20saw%20everyone%20is%20participating%20in%20the%20GrameenPhone%20Aloashbei%20API%20contest%20and%20it%27s%20began%20and%20I%20am%20late%20%3AP.%20So%20why%20not%20doing%20something%20that%20makes%20other%27s%20life%20easy%3F%20So%20I%20decided%20to%20make%20a%20PHP%20class%20to%20do%20that%20job%20for%20you.%20You%20don%27t%20need%20to%20know%20how%20to" title="del.icio.us"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F&amp;t=PHP%20class%20for%20sending%2C%20receiving%20and%20checking%20SMS%20status%20with%20GrameenPhone%27s%20Aloashbei%20API" title="Facebook"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F&amp;title=PHP%20class%20for%20sending%2C%20receiving%20and%20checking%20SMS%20status%20with%20GrameenPhone%27s%20Aloashbei%20API&amp;annotation=I%20saw%20everyone%20is%20participating%20in%20the%20GrameenPhone%20Aloashbei%20API%20contest%20and%20it%27s%20began%20and%20I%20am%20late%20%3AP.%20So%20why%20not%20doing%20something%20that%20makes%20other%27s%20life%20easy%3F%20So%20I%20decided%20to%20make%20a%20PHP%20class%20to%20do%20that%20job%20for%20you.%20You%20don%27t%20need%20to%20know%20how%20to" title="Google Bookmarks"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F&amp;title=PHP%20class%20for%20sending%2C%20receiving%20and%20checking%20SMS%20status%20with%20GrameenPhone%27s%20Aloashbei%20API&amp;source=Tareq%27s+Planet+&amp;summary=I%20saw%20everyone%20is%20participating%20in%20the%20GrameenPhone%20Aloashbei%20API%20contest%20and%20it%27s%20began%20and%20I%20am%20late%20%3AP.%20So%20why%20not%20doing%20something%20that%20makes%20other%27s%20life%20easy%3F%20So%20I%20decided%20to%20make%20a%20PHP%20class%20to%20do%20that%20job%20for%20you.%20You%20don%27t%20need%20to%20know%20how%20to" title="LinkedIn"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F&amp;title=PHP%20class%20for%20sending%2C%20receiving%20and%20checking%20SMS%20status%20with%20GrameenPhone%27s%20Aloashbei%20API" title="Live"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F&amp;title=PHP%20class%20for%20sending%2C%20receiving%20and%20checking%20SMS%20status%20with%20GrameenPhone%27s%20Aloashbei%20API&amp;body=I%20saw%20everyone%20is%20participating%20in%20the%20GrameenPhone%20Aloashbei%20API%20contest%20and%20it%27s%20began%20and%20I%20am%20late%20%3AP.%20So%20why%20not%20doing%20something%20that%20makes%20other%27s%20life%20easy%3F%20So%20I%20decided%20to%20make%20a%20PHP%20class%20to%20do%20that%20job%20for%20you.%20You%20don%27t%20need%20to%20know%20how%20to" title="Ping.fm"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F&amp;title=PHP%20class%20for%20sending%2C%20receiving%20and%20checking%20SMS%20status%20with%20GrameenPhone%27s%20Aloashbei%20API" title="Reddit"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=PHP%20class%20for%20sending%2C%20receiving%20and%20checking%20SMS%20status%20with%20GrameenPhone%27s%20Aloashbei%20API&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F" title="Slashdot"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F&amp;title=PHP%20class%20for%20sending%2C%20receiving%20and%20checking%20SMS%20status%20with%20GrameenPhone%27s%20Aloashbei%20API" title="StumbleUpon"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F" title="Technorati"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F&amp;t=PHP%20class%20for%20sending%2C%20receiving%20and%20checking%20SMS%20status%20with%20GrameenPhone%27s%20Aloashbei%20API&amp;s=I%20saw%20everyone%20is%20participating%20in%20the%20GrameenPhone%20Aloashbei%20API%20contest%20and%20it%27s%20began%20and%20I%20am%20late%20%3AP.%20So%20why%20not%20doing%20something%20that%20makes%20other%27s%20life%20easy%3F%20So%20I%20decided%20to%20make%20a%20PHP%20class%20to%20do%20that%20job%20for%20you.%20You%20don%27t%20need%20to%20know%20how%20to" title="Tumblr"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=PHP%20class%20for%20sending%2C%20receiving%20and%20checking%20SMS%20status%20with%20GrameenPhone%27s%20Aloashbei%20API&amp;body=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F" title="email"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.netvibes.com/share?title=PHP%20class%20for%20sending%2C%20receiving%20and%20checking%20SMS%20status%20with%20GrameenPhone%27s%20Aloashbei%20API&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F" title="Netvibes"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F&amp;partner=sociable" title="PDF"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://tareq.wedevs.com/feed/" title="RSS"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=PHP%20class%20for%20sending%2C%20receiving%20and%20checking%20SMS%20status%20with%20GrameenPhone%27s%20Aloashbei%20API%20-%20http%3A%2F%2Ftareq.wedevs.com%2F2010%2F09%2Fphp-class-for-sending-receiving-and-checking-sms-status-with-grameenphones-aloashbei-api%2F" title="Twitter"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></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>5</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. &#60;?php $user = &#34;&#60;username&#62;&#34;; $url = &#34;http://buzz.googleapis.com/feeds/&#34;.$user.&#34;/public/posted&#34;; $data = file_get_contents($url); $xml = new SimpleXMLElement($data); $status = $xml-&#62;entry[0]-&#62;summary; [...]]]></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' /> </p>
<pre class="brush: php;">
&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>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F&amp;title=Grab%20your%20Google%20Buzz%20Status&amp;bodytext=Here%27s%20how%20you%20can%20get%20your%20google%20buzz%20status%20with%20php.%20Just%20put%20your%20google%20username%20at%20the%20right%20place%20and%20do%20whatever%20you%20want.%0D%0AWe%20have%20used%20simpleXML%20to%20parse%20the%20google%27s%20RSS%20feed%20for%20every%20user.%20%3A%29%0D%0A%0D%0A%5Bphp%5D%0D%0A%26lt%3B%3Fphp%0D%0A%24user%20%3D%20%26quot%3B%26lt%3Buserna" title="Digg"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F&amp;title=Grab%20your%20Google%20Buzz%20Status&amp;notes=Here%27s%20how%20you%20can%20get%20your%20google%20buzz%20status%20with%20php.%20Just%20put%20your%20google%20username%20at%20the%20right%20place%20and%20do%20whatever%20you%20want.%0D%0AWe%20have%20used%20simpleXML%20to%20parse%20the%20google%27s%20RSS%20feed%20for%20every%20user.%20%3A%29%0D%0A%0D%0A%5Bphp%5D%0D%0A%26lt%3B%3Fphp%0D%0A%24user%20%3D%20%26quot%3B%26lt%3Buserna" title="del.icio.us"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F&amp;t=Grab%20your%20Google%20Buzz%20Status" title="Facebook"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F&amp;title=Grab%20your%20Google%20Buzz%20Status&amp;annotation=Here%27s%20how%20you%20can%20get%20your%20google%20buzz%20status%20with%20php.%20Just%20put%20your%20google%20username%20at%20the%20right%20place%20and%20do%20whatever%20you%20want.%0D%0AWe%20have%20used%20simpleXML%20to%20parse%20the%20google%27s%20RSS%20feed%20for%20every%20user.%20%3A%29%0D%0A%0D%0A%5Bphp%5D%0D%0A%26lt%3B%3Fphp%0D%0A%24user%20%3D%20%26quot%3B%26lt%3Buserna" title="Google Bookmarks"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F&amp;title=Grab%20your%20Google%20Buzz%20Status&amp;source=Tareq%27s+Planet+&amp;summary=Here%27s%20how%20you%20can%20get%20your%20google%20buzz%20status%20with%20php.%20Just%20put%20your%20google%20username%20at%20the%20right%20place%20and%20do%20whatever%20you%20want.%0D%0AWe%20have%20used%20simpleXML%20to%20parse%20the%20google%27s%20RSS%20feed%20for%20every%20user.%20%3A%29%0D%0A%0D%0A%5Bphp%5D%0D%0A%26lt%3B%3Fphp%0D%0A%24user%20%3D%20%26quot%3B%26lt%3Buserna" title="LinkedIn"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F&amp;title=Grab%20your%20Google%20Buzz%20Status" title="Live"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F&amp;title=Grab%20your%20Google%20Buzz%20Status&amp;body=Here%27s%20how%20you%20can%20get%20your%20google%20buzz%20status%20with%20php.%20Just%20put%20your%20google%20username%20at%20the%20right%20place%20and%20do%20whatever%20you%20want.%0D%0AWe%20have%20used%20simpleXML%20to%20parse%20the%20google%27s%20RSS%20feed%20for%20every%20user.%20%3A%29%0D%0A%0D%0A%5Bphp%5D%0D%0A%26lt%3B%3Fphp%0D%0A%24user%20%3D%20%26quot%3B%26lt%3Buserna" title="Ping.fm"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F&amp;title=Grab%20your%20Google%20Buzz%20Status" title="Reddit"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Grab%20your%20Google%20Buzz%20Status&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F" title="Slashdot"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F&amp;title=Grab%20your%20Google%20Buzz%20Status" title="StumbleUpon"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F" title="Technorati"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F&amp;t=Grab%20your%20Google%20Buzz%20Status&amp;s=Here%27s%20how%20you%20can%20get%20your%20google%20buzz%20status%20with%20php.%20Just%20put%20your%20google%20username%20at%20the%20right%20place%20and%20do%20whatever%20you%20want.%0D%0AWe%20have%20used%20simpleXML%20to%20parse%20the%20google%27s%20RSS%20feed%20for%20every%20user.%20%3A%29%0D%0A%0D%0A%5Bphp%5D%0D%0A%26lt%3B%3Fphp%0D%0A%24user%20%3D%20%26quot%3B%26lt%3Buserna" title="Tumblr"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Grab%20your%20Google%20Buzz%20Status&amp;body=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F" title="email"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.netvibes.com/share?title=Grab%20your%20Google%20Buzz%20Status&amp;url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F" title="Netvibes"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F&amp;partner=sociable" title="PDF"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://tareq.wedevs.com/feed/" title="RSS"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Grab%20your%20Google%20Buzz%20Status%20-%20http%3A%2F%2Ftareq.wedevs.com%2F2010%2F02%2Fgrab-your-google-buzz-status%2F" title="Twitter"><img src="http://tareq.wedevs.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></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>
