| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/HostingSpaces/admin/sms4real.com/wwwroot/test/php/ |
Upload File : |
<?php
// Message details
$Authorization = 'JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJjNWNkZGE1YS04YTcwLTQzMDYtOGVkZS1mZjVkNTJkZjBkNjIiLCJzZWNyZXQiOiI1NmMwNDdiMThkNmI0MTgyOGUxMWNhOWE2YmQwNTRiM2Q2MTJhZjgzYzU2NmFiMjk1OGY4MzhmZTc0NGYzOTAwIiwiaWF0IjoxNjc1NTQxMDg2LCJleHAiOjI0NjM5NDEwODZ9.FMRsi2oR8cOtTNM3zhn2vPv8jYjYFPC4OZSXUdtr4ZA';
$jsonData = array(
'sender' => 'TheSMSWorks',
'destination' => '447417443514',
'content' => utf8_encode('My Test Message from SMS Works')
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Authorization:'.$Authorization
));
curl_setopt($ch, CURLOPT_URL, "https://api.thesmsworks.co.uk/v1/message/send" );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt($ch, CURLOPT_POST, 1 );
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($jsonData));
$result=curl_exec ($ch);
var_dump( $result);
curl_close($ch);
?>