开发者

Get result of cURL request fired by cron job

开发者 https://www.devze.com 2023-03-12 09:04 出处:网络
I\'ve set up a cron job via my hosting account\'s cPanel. This basically calls an external URL every 30 minutes. I\'m using cURL (as wget is disabled for me due to being on a shared server).

I've set up a cron job via my hosting account's cPanel. This basically calls an external URL every 30 minutes. I'm using cURL (as wget is disabled for me due to being on a shared server).

The command I fire is as follows:

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

However, my email response comes back with the resultant HTML (which I want) but also prefixed with down开发者_如何学Goload information:

% 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>

What parameter can I use to suppress the stuff above <html>?


Use -s or --silent. See this answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号