|
Server IP : 10.128.40.6 / Your IP : 216.73.216.233 Web Server : Apache System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : logmcpe ( 111175) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/logmcpe/www/TMCPRO/pages/sms/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
//require __DIR__ . '/vendor/autoload.php';
//use \Ovh\Sms\SmsApi;
require __DIR__ . '/vendor/autoload.php' ;
use \Ovh\Api;
error_reporting(E_ALL);
ini_set('display_errors', 1);
$applicationKey = "3QTamGrntZTeBlul";
$applicationSecret = "HgWWtMzq2qQeNcFhmEOBZ2Xp4DBDhImR";
$consumer_key = "V7NIDRFOQtfLn4c1D1ieT187WBdyyuJE";
$endpoint = 'ovh-eu';
$conn = new Api ($applicationKey ,
$applicationSecret ,
$endpoint ,
$consumer_key );
//
$smsServices = $conn ->get('/sms/' );
$receivers = $_POST["txtPhone"];
$message = htmlspecialchars($_POST["txtMessage"]);
$senderForResponse = "0033755503746" ;
$content = (object) array(
"charset" => "UTF-8",
"class" => "phoneDisplay",
"coding" => "7bit",
"message" => $message,
"noStopClause" => false,
"priority" => "high",
"receivers" => [$receivers],
// "senderForResponse" => [$senderForResponse],
"senderForResponse" => true,
"validityPeriod" => 2880
);
$resultPostJob = $conn->post('/sms/'.$smsServices[0].'/jobs',$content);
if(!empty($resultPostJob['validReceivers'])){
echo '<h3 style="color:green;font-weight:bold;font-size:1.3em; border:solid 1px green; padding:5px;">SMS Sent Successfully</h3>';
}else{
echo '<h3 style="color:red;font-weight:bold;font-size:1.3em; border:solid 1px red; padding:5px;">Something is Wrong. Please check your API Settings or Sent Data</h3>';
}
echo '<button onclick="goBack()">Go Back</button>';
?>
<script>
function goBack() {
window.history.back();
}
</script>