`
sillycat
  • 浏览: 2489753 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

PHP Call Wget Command

    博客分类:
  • PHP
 
阅读更多
PHP Call Wget Command

In my PHP code, I am using system command to download files as follow:
$wgetCmd = "wget --no-check-certificate -nv -O " . $this->storageLocal . "{$outputFileName}-downloading.xml {$url}";
if (system($wgetCmd) != 0) {
    $success = false;
    return $success;
}

In some situation, I get this error message without “—no-check-certificate"
Wget error: ERROR: The certificate of is not trusted / Skipping ssl/tls certificate checks with wget

The fix is add the parameter to wget command.

references:
https://forum.ivorde.com/wget-error-error-the-certificate-of-is-not-trusted-t19611.html
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics