Coder Social home page Coder Social logo

dihan-tech / osms-codeigniter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onnorokomsms/osms-codeigniter

0.0 0.0 0.0 1.72 MB

OnnoRokom SMS integration with CodeIgnier. Send sms from CodeIgniter

Home Page: https://onnorokomsms.com

PHP 22.42% HTML 76.92% CSS 0.14% JavaScript 0.53%

osms-codeigniter's Introduction

osms-codeIgniter

OnnoRokom SMS integration with CodeIgnier. Send sms from CodeIgniter

Requirements:

  1. SOAP extension on webserver
  2. CodeIgniter nusoap_library ( available at sourceforge )

write following code at your Controller Action code block

try
	{ 	
		
		//Register free demo account from https://onnorokomsms.com
		
		$userName = "your user name";
		$passWord = "your user password";
		
		$this->load->library("Nusoap_library");
		$soapClient =  new nusoap_client("https://api2.onnorokomSMS.com/sendSMS.asmx?wsdl", 'wsdl');
		
		//Soap Unicode Support
		
		$soapClient->soap_defencoding = 'UTF-8';
		$soapClient->decode_utf8 = false;
		
		//OneToOne
		
		$paramArray = array(
			'userName'=>$userName,
			'userPassword'=>$passWord, 
			'mobileNumber'=> "01841336333", 
			'smsText'=>"Single SMS Send from CodeIgniter Test", 
			'type'=>"TEXT",
			'maskName'=> "DemoMask", 
			'campaignName'=>'',
		);
		echo "before calling method";
		$value = $soapClient->call("OneToOne", $paramArray);			
		echo 'output is '; print_r($value);
		
		
		// One to Many 
		/*
		$paramArray = array(
			'userName'=>$userName,
			'userPassword'=>$passWord, 
			'messageText'=>"Bulk SMS Send from CodeIgniter Test", 
			'numberList'=> "01811444729,01833168163", 				
			'smsType'=>"TEXT",
			'maskName'=> "DemoMask", 
			'campaignName'=>'',
		);
		echo "before calling method";
		$value = $soapClient->call("OneToMany", $paramArray);			
		echo 'output is '; print_r($value);
		*/
	
	}
	catch (Exception $e) {
		echo $e;
	}

3rd party helper library and example code only available at CI_SMS_MIN_FILES.zip file.

osms-codeigniter's People

Contributors

hiroksarker avatar onnorokomsms avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.