I have the following php code:
exec('curl -X POST http://mysite.com', $output =array());
The return string my http://mysite.com is not displayed on the shell, but the following string is displayed:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 3 0 3 0 0 19 0 --:--:-- --:--:-- --:--:-- 0
I don't want anything to display on the shell. How to I disable priting to the shell when using exec() command. There are other commands?
Use curl's silent option: -s
exec('curl -s http://us.php.net/manual/en/function.ob-clean.php', $output);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With