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

24 thoughts on “PHP class for sending, receiving and checking SMS status with GrameenPhone’s Aloashbei API”

  1. ভালোই তো। আমার মোবাইলে একটা sms পাঠান তো দেখি। 😀

    1. তোমার মোবাইল থেকে আমার মোবাইলে আগে একটা মেসেজ পাঠাও 😛

  2. Thanks Tareq vai,
    For these codes.

    Actually i am newbie in OOP. So i have a little question. 😉

    in your ‘class.Aloashbei.php’ file you have made all the properties protected.

    But suppose i want to make them Private. Is there any problem if i do so ?

    1. private: No access from outside the class, either by the script or from another class.
      protected: No access from outside except from a class that is a child of the class with the protected attribute or method.

      That means if you make the variable private, you can’t access them from the child class. That’s why it’s protected. Does that makes sense?

  3. You can charge any user who buys any content through the Charging API.

    ভাইয়া, এই লাইনটা সম্পর্কে একটু বিস্তারিত বলবেন?
    মানে কোন অনলাইন শপিং এর জন্য এটা সেটআপ করা সম্ভব, নাকি শুধু মোবাইল কন্টেন্ট এর জন্য?
    চার্জ করার পর সেই চার্জটা কিভাবে কোথায় জমা হবে?

    ধন্যবাদ। সাইটটা খুব ভালো লাগলো। এখন থেকে ফলো করবো নিয়মিত। ধন্যবাদ

    1. এইটা দিয়ে এই ধরনের কাজ করা যাবে। কিন্তু প্ব়্যাকটিকালি এখনো কিছু দেয়নি গ্রামীণফোন।

  4. Vai
    I am new in this track, i follow your steps but find the following error:
    Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t find in ‘G:xampphtdocssend_smsincludesWebService_GP_ADP_BizTalk_SMS_Orchestrations.wsdl’ in G:xampphtdocssend_smsclass.AloashbeiSMS.php:30 Stack trace: #0 G:xampphtdocssend_smsclass.AloashbeiSMS.php(30): SoapClient->SoapClient(‘includes/WebSer…’) #1 G:xampphtdocssend_smssms.php(14): AloashbeiSMS->__construct(‘theKamrul’, ‘******’, ‘*******’) #2 {main} thrown in G:xampphtdocssend_smsclass.AloashbeiSMS.php on line 30

    1. i put the WebService_GP_ADP_BizTalk_SMS_Orchestrations.wsdl in the includes directory.

    plz help me


  5. Thanks for your script.

    I have a question. In where i do registered. In send.php file there have some requirement of registration related. Please give the registered website. I already registered into . But here have no user_id. Please give details info.

    1. Finally i success to send the sms. But i need to send long sms. where have the max char limition, i didn’t find it. I tested one sms by sending long sms , give me error msg “ERROR ! SMS Content Length Exceed max char “.

      How i solve this.


  6. This script is only send sms into gp sim , other opertator(banglalink, airtell, citycell on) it shows invalid mobile number. Is it possible using this api to send sms into all operator.


  7. I need web developer who expert in grameenphone/banglalink/warid/robi charging API.i have a product selling website where i use this charging API so that bangladeshi user can pay with their mobile, for buy product on my website.any interested developer can direct mail me to my mailbox.surely i can reaply and contact with you.
    thank u.

    Regards-Ankita Sarma
    Ceo And founder
    Outsourcerzone India Ltd.

    1. Hello Ankita, grameenphone/banglalink/warid/robi doesn’t provide any public API for charging for contents right now. So it’s not possible without contracting the operators itself.

      1. i am not telling you public API for general purpose.we have all legal doccument for a private company in bangladesh.but now i want to know that how can i contract with this company.our buiseness admins were contact with grameenphone by mail.but they didnot give us any reaply.our buiseness partner stay near dhaka.but they didnot get such way to get it.actually a technician person is need for this operation as well.please reaply me what can we do?

        1. Sorry, I can’t help you this way either. I am an individual person also and I am not affiliated or connected to any operators. So nothing I can do. I just wrote the class for more easier usage according to their developer API they released.

  8. @ ankita sarma, i hope i can help u. if u r interested plz contact with me. this needs to contact with all operators. i am in a i think it will be easier for me. i am also interested to do such project.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.