2017-01-03 63 views
0

我正在使用http://www.fast2sms.com发送群发SMS的朋友。但现在我想向每位新用户发送欢迎短信和确认短信。我正在使用WordPress网站。 Fast2SMS为我提供了一个API:SMS网关设计Fast2SMS

http://api.fast2sms.com/sms.php?token=&mob=&mess=&sender=SONIIN&route=0

token= Your UNIQUE TOKEN ID 
mob= 10 Digit Indian Mobile Number 
mess= 145 Character (English only) 
sender= 6 Digit Sender ID 
route=0- NonDND & 1- DND 

请告诉我如何使用它,如果可能的话再告诉我如何建立它在我的WordPress管理面板

+0

可以让插件this.In插件添加钩状https://codex.wordpress.org/Plugin_API/Action_Reference/user_register –

回答

0

这是接受一个GET请求,所以...

$token = "1SDJGWEH"; 
$mob = "7855212520"; 
$msg = "HELLO"; 
$sender = "Hola"; 

$url = "http://api.fast2sms.com/sms.php?token=".$token."&mob=".$mob."&mess=".$msg."&sender=".$sender."&route=0"; 

$resp = file_get_contents($url); 

print_r($resp); 

这将工作...

使POST请求,您需要使用CURL

+0

谢谢,您的帮助 –