|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-07-31 01:26 UTC] jianmang at stachanov dot com
I would love to see fopen can "talk" to a SSL enabled server. This feature is crucial for server-to-server secure communication/automation. Currently I use curl to acheive this. Curl is a ~1 MB beast, obviously this creates considerable startup costs. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 00:00:01 2025 UTC |
User Response: While working on #5865, you could also add generic SSL socket support to fsockopen, something like fsockopen("ssl://example.com", ...) don't forget to add support for client certificates/keys, including passing the password to unlock 'em (ok, this would probably require a completely new function). for connecting to a single server, one solution is running a stunnel daemon: stunnel -c -d 127.0.0.1:1000 -r example.com:123 -p /certs/blah.pem and then fsockopen()ing to that port; however, this is both a security problem (anyone on the machine can connect to that port) and useless, if one wishes to connect to a host that is not known in advance. another option would be to allow php to talk to exec'd processes (hopefully stunnel works this way; it doesn't when piped), but this requires an extra process per request which is a resource hog. and, well, this is all in openssl already, so ...