php - 从 discord.js 运行 php 网页
问题描述
我正在制作一个机器人,如果您执行 /run,它将发出 api 请求并启动基于 Web 的操作,但我需要从 node.js 命令运行页面,我目前拥有的是
var request = require('request');
request('http://example.com/?ip=xxx-xxx-xxx', function (error, response,
body) {
if (!error && response.statusCode == 200) {
console.log(body) // Print the google web page.
}
})
但这似乎不起作用......
我该怎么做呢?
编辑:这是 cloudflare 阻止访问
解决方案
推荐阅读
- macos - 无法在 macOS 应用程序的 FFMPEG 进程中通过 NSOpenPanel 访问用户选择的文件
- parallel-processing - 循环依赖分析:这个循环可以并行化吗?
- php - 显示下一个字段悬停切换按钮
- python - 如何在python中执行两个大熊猫文件的交叉连接
- html - 为数组对象管理我的 *ngFor 时出现问题
- scala - 播放 Json 验证在日期字段上失败并出现错误:[error.expected.date.isoformat]
- react-native - 调用 SearchBox 组件进入事件并在子组件上填充数据
- angular - ngx剪贴板订阅copyResponse$不起作用
- mysql - 触发 MYSQL 时间戳
- mysql - MySQL在匹配其他表或其中不存在时查找ID