Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
MARINE-SERVICE-SYSTEM/sendSMS.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
24 lines (22 sloc)
870 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Authorisation details. | |
$username = ""; | |
$hash = ""; | |
// Config variables. Consult http://api.textlocal.in/docs for more info. | |
$test = "0"; | |
// Data for text message. This is the text message data. | |
$sender = "TXTLCL"; // This is who the message appears to be from. | |
$numbers = ""; // A single number or a comma-seperated list of numbers | |
$message = ""; | |
// 612 chars or less | |
// A single number or a comma-seperated list of numbers | |
$message = urlencode($message); | |
$data = "username=".$username."&hash=".$hash."&message=".$message."&sender=".$sender."&numbers=".$numbers."&test=".$test; | |
$ch = curl_init('http://api.textlocal.in/send/?'); | |
curl_setopt($ch, CURLOPT_POST, true); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
$result = curl_exec($ch);// This is the result from the API | |
//print_r($result); | |
curl_close($ch); | |
?> |