Ubuntu 中的桌面短信客户端

rɑː*_*dʒɑ 9 software-recommendation sms

嗨,我正在寻找某种脚本/软件,可以帮助我从我的 Ubuntu 机器发送短信。桌面客户端/应用程序实际上是通过使用我们用来发送短信的网络服务,如 way2sms.com 或 160by2.com 等。

小智 6

干得好。在 160by2.com 创建一个帐户并在您的系统上安装 php。

sudo apt-get install php5-cli php5-curl curl
Run Code Online (Sandbox Code Playgroud)

在我提到的位置粘贴您的号码和密码并运行此脚本:

<?php
echo"电话:";$phno=trim(fgets(STDIN));
echo"消息:";$msg=trim(fgets(STDIN));
echo"消息长度:".strlen($msg)."\n正在发送...";
$你的号码=''; //你的单引号里面的数字
$yourpassword='';//单引号内的密码
$cur=curl_init("http://160by2.com/re-login");
curl_setopt($cur,CURLOPT_POST,1);
curl_setopt($cur,CURLOPT_POSTFIELDS,"username=$yournumber&password=$yourpassword");
curl_setopt($cur,CURLOPT_COOKIESESSION,1);
curl_setopt($cur,CURLOPT_COOKIEJAR,"cookie");
curl_exec($cur);
curl_close($cur);
$cur=curl_init("http://160by2.com/SendSMSAction");
curl_setopt($cur,CURLOPT_POST,1);
curl_setopt($cur,CURLOPT_AUTOREFERER,1);
curl_setopt($cur,CURLOPT_COOKIEFILE,"cookie");
curl_setopt($cur,CURLOPT_POSTFIELDS,"mobile1=$phno&msg1=$msg&action1=sa65sdf656fdfd");
$x=curl_exec($cur);
curl_close($cur);
echo"\n已发送!";

将脚本另存为 sms.php.Then 在终端运行 php sms.php

完毕!