I have wordpress website & FTP
I want to integrate the bulk sms service with my wordpress website. is it possible to we do this…
What I have?
UNIQUE TOKEN ID
MESSEGE, SENDERID (6 digit)
Wordpress templates are PHP files. So you just have to write the API requests. The request looks like a an HTTP GET, so you can try using the regular filesystem functions if your server allows it
@chorn I only know to edit HTML or css but I have not idea where from I request and where I edit .
I going to do this on all specialist guys who is here and I am doing this on my idea and his command.
Is there no any simple form that easy edit the code and run I’m FTP and Wordpress Page?
Is this also part of your school project?
if you want to run it independently, you can just make a PHP file with a
file_get_contents statement to your API URL in it and upload it to a server with PHP enabled. If you want to integrate it into Wordpress, you have to find a point where PHP is executed and proceed the same way.
Is this right php?
//Your authentication key
$authKey = "YourAuthKey";
//Multiple mobiles numbers separated by comma
$mobileNumber = "9999999";
//Sender ID,While using route4 sender id should be 6 characters long.
$senderId = "102234";
//Your message to send, Add URL encoding here.
$message = urlencode("Test message");
$route = "default";
//Prepare you post parameters
$postData = array(
'authkey' => $authKey,
'mobiles' => $mobileNumber,
'message' => $message,
'sender' => $senderId,
'route' => $route
// init the resource
$ch = curl_init();
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $postData
//,CURLOPT_FOLLOWLOCATION => true
//Ignore SSL certificate verification
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$output = curl_exec($ch);
//Print error if any
echo 'error:' . curl_error($ch);
you want to run it independently, you can just make a PHP file with a file_get_contents statement to your API URL in it and upload it to a server with PHP enabled. If you want to integrate it into Wordpress, you have to find a point where PHP is executed and proceed the same way.
Is this right?
$token = "1SDJGWEH";
$mob = "7855212520";
$msg = "HELLO";
$sender = "Hola";
$url = "http://api.website.com/sms.php?token=".$token."&mob=".$mob."&mess=".$msg."&sender=".$sender."&route=0";
$resp = file_get_contents($url);
Is this right?
did you test it? does it work? do you get any errors? do you get the expected output? do you get a sms? as i do not know what a valid result of this action may be, it’s up to you answering this.
I don’t know php…
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.