首页 文章

获取cron job发出的cURL请求的结果

提问于
浏览
0

我've set up a cron job via my hosting account' s cPanel . 这基本上每隔30分钟调用一个外部URL . 我正在使用cURL(由于在共享服务器上,因为 wget 已禁用) .

我开火的命令如下:

curl http://www.example.com/filename.php

但是,我的电子邮件响应返回了生成的HTML(我想要的),但也带有下载信息的前缀:

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                Dload  Upload   Total   Spent    Left  Speed

 0     7    0     7    0     0     39      0 --:--:-- --:--:-- --:--:--    39
100   174    0   174    0     0    484      0 --:--:-- --:--:-- --:--:--   917
<html>
 ...
</html>

我可以用什么参数来压制 <html> 以上的东西?

1 回答

  • 1

    使用 -s--silent . 见this answer .

相关问题