2 comments on “How to include PHP files in PHPRunner events and scripts

  1. dear paul
    want to know sending sms from selected records in phprunner 6.2 using ozeki sms server gateway same concept to send selected user email button on list page
    did u knw how to do that

    • Hi Ahsun, which bit are you having issues with? the PHPRunner loop control for processing selected records should be pretty much identical to the email sending examples that xlinesoft publish. Put a button in the button area above your list grid (where you see delete selected etc). In the button event, PHPserver side put:
      global $dal;
      while ( $data = $button->getNextSelectedRecord() ) {
      // do something with each record found…
      $ct = $ct + 1;
      $sql = “Update some_table set some_field = 1 where id = “.$data[“id”];

      $result[“txt”] = $ct . ” records were updated.”;

      In the javascript after_client event you can put some sort of “done” message
      var message = result[“txt”];

      You would clearly want to do some SMS message construction and then call the ozeki gateway to send your SMS. I have never used Ozeki server. For sending SMS messages there is a free and easy way, and all you do is send an email to the phone number at the carrier’s domain. e.g., if you want to send an SMS to 555-123-1234 and the cell subscriber is on Verizon, you would just send an email to 5551231234@vtext.com.
      All the carriers have a similar capability. This blogger http://20somethingfinance.com/how-to-send-text-messages-sms-via-email-for-free/ put a nice list of the carrier addresses together.
      Xlinesoft also put together a good tutorial on interfacing to Twilio to do the same job. you can find it at http://www.asprunner.com/forums/topic/22786-sending-record-data-via-sms/

      hope that helped you a little. Have fun!

Leave a Reply