小编Cle*_*sil的帖子

卷曲 - 反应迟钝

我从某人那里得到了一个地址和端口号.我正在发送一个名为"tagstream"的东西,并收到一个回复​​,一个zpl标签.

我应该通过套接字连接发送这个标签流来触发"Uni-Box".我试过用curl做这件事.它有效,但我得到回复大约需要10秒钟.

    $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, '87.213.39.202');
        curl_setopt($ch, CURLOPT_PORT, 3032);

        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

        curl_setopt($ch, CURLOPT_POST, 0);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $message);

    $zpl = curl_exec($ch);

    curl_close($ch);
Run Code Online (Sandbox Code Playgroud)

这是我从curl_getinfo()得到的:

array:26 [?
  "url" => "HTTP://87.213.39.202/"
  "content_type" => null
  "http_code" => 0
  "header_size" => 0
  "request_size" => 538
  "filetime" => -1
  "ssl_verify_result" => 0
  "redirect_count" => 0
  "total_time" => 10.327
  "namelookup_time" => 0.0
  "connect_time" => 0.031
  "pretransfer_time" => 0.031
  "size_upload" => 410.0
  "size_download" => 8598.0
  "speed_download" => 832.0
  "speed_upload" => 39.0
  "download_content_length" => -1.0
  "upload_content_length" => …
Run Code Online (Sandbox Code Playgroud)

php sockets curl

8
推荐指数
1
解决办法
1048
查看次数

Swiftmailer:无法连接TLS加密

我正在尝试使用Swiftmailer通过Symfony发送电子邮件.在生产服务器上,我收到一个错误:

[2016-08-20 11:59:37] app.ERROR: Exception occurred while flushing email queue: Unable to connect with TLS encryption [] []
Run Code Online (Sandbox Code Playgroud)

这是我在config.yml中的内容:

swiftmailer:
transport: smtp
host:      localhost
username:  info@derkvanderheide.nl
password:  testpw
spool:     { type: memory }
encryption: tls
port:       587
Run Code Online (Sandbox Code Playgroud)

Postfix是我的邮件服务器,它与Plesk一起安装.

这是我的postfix main.cf:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname …
Run Code Online (Sandbox Code Playgroud)

php plesk swiftmailer symfony postfix

6
推荐指数
1
解决办法
7393
查看次数

标签 统计

php ×2

curl ×1

plesk ×1

postfix ×1

sockets ×1

swiftmailer ×1

symfony ×1