From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.3.0 PHP Bug Type: Sockets related Bug description: fopen/fsockopen via HTTPS
The problem I am experiencing is close to, but not exactly, the same problem in bug #21642. That problem was not fully explained or understood by me and since the conversation went offline, I may never know what actually was resolved. I am trying to access a Outlook Web Access box via SSL (HTTPS). Because the fsockopen() does not support SSL directly (because it starts in the clear initially) I tried to use fopen() but because you are not allowed to write to a HTTP-schemed, fopen()connection, I cannot see how to get around POST'ing info to the site. Am I missing an easier way to do this? The error I receive with fopen() is: "failed to create stream: HTTP wrapper does not support writeable connections". Here is a snippit of code: ---------- $fp = fopen("https://webmail.domain.com", "w+"); if(! $fp) { echo "Could not connect to server.\n"; exit; } fputs($fp, "POST /exchange/logon.asp HTTP/1.1\r\n"); fputs($fp, ...various HTTP headers and info...); while(! feof($fp)) echo fgets($fp, 1024); fclose($fp); ------------ I know it may not always be necessary to POST data, but I need to know if I must use Perl (which I can use LWP) for this. I would really like to stick with PHP because everything else is already written in it. Some system info... --------- $ php -v PHP 4.3.0 (cli) (built: Jan 24 2003 15:12:37) Copyright (c) 1997-2002 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies $ php -m [PHP Modules] ctype ftp ldap mysql oci8 openssl overload pcre posix saprfc session standard tokenizer xml [Zend Modules] ---------- TIA for help, comments, and/or suggestions. Mike Duncan Web Master/Developer Sonopress LLC [EMAIL PROTECTED] -- Edit bug report at http://bugs.php.net/?id=21905&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21905&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21905&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21905&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21905&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21905&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=21905&r=support Expected behavior: http://bugs.php.net/fix.php?id=21905&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=21905&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=21905&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21905&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21905&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21905&r=dst IIS Stability: http://bugs.php.net/fix.php?id=21905&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=21905&r=gnused