当前位置: 首页 > 工具软件 > PHP Open Biz > 使用案例 >

php curl采集被拒绝,cloudinary&# 39 PHP上传API中的cURL错误—未能连接到端口443:连接被拒绝。...

安毅
2023-12-01

I use Cloudinary’s PHP API to upload images from my server to Cloudinary storage. The code snippet I use is:

$imguploadres = \Cloudinary\Uploader::upload([URL HERE], [ARRAY OF OPTIONS]);

This snippet works like a charm in my localhost (XAMPP) which is HTTP. But when I uploaded this code to my server on the Internet having HTTPS, it started outputting this error: “failed to connect to port 443: connection refused”.

I have searched for the solution on the Internet for some hours now, but to no avail. Most solutions involved enabling the “HTTP on Outgoing connections” setting through the hosting panel, but unfortunately I have no access to it.

For some info to help you, I use Biz.nf free hosting, but my domain is paid (.COM) from GoDaddy. I also use Cloudflare’s shared SSL and other features. The PHP script that contains the above snippet is called using JS AJAX.

Thanks in advance. Ask any questions as comments and I’ll try my best to answer them.

 类似资料: