dataflow1117@gmail.com
FacebookTwitter

en English
af Afrikaanssq Albanianam Amharicar Arabichy Armenianaz Azerbaijanieu Basquebe Belarusianbn Bengalibs Bosnianbg Bulgarianca Catalanceb Cebuanony Chichewazh-CN Chinese (Simplified)zh-TW Chinese (Traditional)co Corsicanhr Croatiancs Czechda Danishnl Dutchen Englisheo Esperantoet Estoniantl Filipinofi Finnishfr Frenchfy Frisiangl Galicianka Georgiande Germanel Greekgu Gujaratiht Haitian Creoleha Hausahaw Hawaiianiw Hebrewhi Hindihmn Hmonghu Hungarianis Icelandicig Igboid Indonesianga Irishit Italianja Japanesejw Javanesekn Kannadakk Kazakhkm Khmerko Koreanku Kurdish (Kurmanji)ky Kyrgyzlo Laola Latinlv Latvianlt Lithuanianlb Luxembourgishmk Macedonianmg Malagasyms Malayml Malayalammt Maltesemi Maorimr Marathimn Mongolianmy Myanmar (Burmese)ne Nepalino Norwegianps Pashtofa Persianpl Polishpt Portuguesepa Punjabiro Romanianru Russiansm Samoangd Scottish Gaelicsr Serbianst Sesothosn Shonasd Sindhisi Sinhalask Slovaksl Slovenianso Somalies Spanishsu Sudanesesw Swahilisv Swedishtg Tajikta Tamilte Teluguth Thaitr Turkishuk Ukrainianur Urduuz Uzbekvi Vietnamesecy Welshxh Xhosayi Yiddishyo Yorubazu Zulu

DataInFlow
DataInFlow
A Market place of programming
  • Home
  • Tutorial
    • HTML Tutorial
    • PHP TUTORIAL
  • Article
    • Technology
    • Entertainment and News
    • Game
    • Recipes
  • Queries
  • Programming
    • HTML
    • CSS
    • jQuery
    • JavaScript
    • WordPress
    • PHP
    • Codeigniter
    • Laravel
    • Ionic
    • Angular JS
    • Node JS
    • Vue JS
    • Android
    • ASP .NET
  • Sports
    • Cricket
    • Football
    • Football Live Score
  • Web Tools
  • Home
  • Tutorial
    • HTML Tutorial
    • PHP TUTORIAL
  • Programming
  • Queries
  • Sports
    • Cricket
    • Football
    • Football Live Score
  • Article
    • Entertainment and News
    • Technology
    • Recipes
    • Game
  • Web Tools
  • About Us
  • Contact

how to send text message using php codeigniter

374 viewsJune 7, 2019codeigniterCodeigniter
0
joy (anonymous) Posted June 4, 2019

can you please tell me how to send text message using php codeigniter with full code and documentation

0 Comments

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Satish Pandey (anonymous) Posted June 6, 2019

If you have sms-gateway-provider and have a user-id, password and api-url. Then folow this sample codes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
function sms_code_send($number='',$message='')
{
$username = 'user name';
$password = '*******';
$originator = 'sender name';
$message = 'Welcom to ......, your activation code is : '.$message;
//set POST variables
$url = 'http://exmaple.com/bulksms/go?';
 
$fields = array(
'username' => urlencode($username),
'password' => urlencode($password),
'originator' => urlencode($originator),
'phone' => urlencode($number),
'msgtext' => urlencode($message)
);
 
$fields_string = '';
 
//url-ify the data for the POST
foreach($fields as $key=>$value)
{
$fields_string .= $key.'='.$value.'&';
}
 
rtrim($fields_string,'&');
 
//open connection
$ch = curl_init();
 
//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST,count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
 
//execute post
$result = curl_exec($ch);
 
//close connection
curl_close($ch);
return $result;
}
?>

Select 0 Comments
You are viewing 1 out of 1 answers, click here to view all answers.
Write your answer.
Register or Login
Question and answer is powered by AnsPress.io
Subscribe to our Newsletter
Search anything
Questions
How to display success message after submit form value in php 2 Answers | 0 Votes
Should The Government Pay For IT Education? 9 Answers | 0 Votes
What are the top 10 question answer website for programming? 9 Answers | 0 Votes
Fatal error: Uncaught Error: Call to undefined function mysql_connect() 2 Answers | 0 Votes
How to set a session variable in laravel 5.2 4 Answers | 0 Votes
Recent Programming Article
  • Menu hide from sidebar in ionic 3
    June 4, 2019
  • Generate bootstrap modal in angular 6
    June 4, 2019
  • Load more results functionality with jQuery , Ajax and PHP
    June 4, 2019
  • Facebook login with JavaScript SDK
    June 4, 2019
  • Facebook login in Codeigniter and MySQL
    June 4, 2019
Hire us

Hi
Do you want to make web application with php and php framework(CI, Laravel)? Want to make android application with hybrid framework ? Then contact with us. We provide support for developing website and web application at very affordable price.
E-Mail us at: dataflow1117@gmail.com

Recent Technlogy News
  • Astrology Software: Perfect Tool for Astrologers to Earn Money Online
    June 4, 2019
  • Actionable Steps to Secure Workplace for Dummies
    June 4, 2019
  • The Best Spy Glasses in 2019 You Can Buy now
    June 4, 2019
© Copyright 2017-2018 DataInFlow

About Us    Privacy policy    Contact us

Login

Lost your password?

Reset Password

Log in