PHP code example of teknicode / aws-wrapper

1. Go to this page and download the library: Download teknicode/aws-wrapper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

teknicode / aws-wrapper example snippets


$aws_credentials = array(
   "aws_access_key_id" => "", /* REQUIRED */
   "aws_secret_access_key" => "", /* REQUIRED */
   "default_region" => "", /* REQUIRED */
   "sms_sender_id" => "", /* REQUIRED for sms sending */
   "email_from" => "" /* REQUIRED for email sending */
);

$wrapper = new Teknicode\Aws($aws_credentials);

$sms = $wrapper->sms("phone_number","message");

returns
array("status"=>"success","message_id"=>"{MESSAGE ID}")
or
array("status"=>"error","error"=>"{ERROR MESSAGE}")

$sms = $wrapper->email("email address","subject","html",[attachments]);

returns
array("status"=>"success","message_id"=>"{MESSAGE ID}")
or
array("status"=>"error","error"=>"{ERROR MESSAGE}")