我试图使用SMS Gateway应用程序将我的手机用作短信网关。获取Android手机的请求
该应用程序侦听HTTP GET请求,从请求中提取电话号码和消息,然后发送和SMS。
该应用程序提供了以下目标网址: http://fe80::57ee::c539:6741%rmnet0:9090/sendsms(不是真正的IP)
我的问题是:
为什么这个样子的IPv6虽然我的手机有一个IPv4地址?
如何包括在HTTP请求
"%rmnet0"
?有什么不对下面的代码
node.js
? (IP和电话号码节录)var request = require('request'); function send(phone,message){
} 发送( '00684060640', '欢迎');// Set the headers var headers = { 'User-Agent': 'Domogeek/4', 'Content-Type': 'application/x-www-form-urlencoded' }; // Configure the request var options = { url: "http://fe80::57ee::c539:6741%rmnet0:9090/sendsms", // url: "http://92.90.21.38:9090/sendsms", method: 'GET', headers: headers, qs: {'phone': phone, 'text': message} }; console.log('GET request'); // Start the request request(options, function (error, response, body) { if (!error && response.statusCode == 200) { console.info('SMS sended to: %s => %s', phone, message); } else { console.error('SMS error : %s => %s', error, message); } });
非常感谢!
谢谢,所以应用程序正在监听本地界面。 Android会将传入的请求转发到该链接本地地址?这将如何工作? – jomcfly