Jon Kraft <jo*@jonux.co.uk> wrote in message news:<Xn**************************@130.133.1.4>...
ng**********@rediffmail.com (R. Rajesh Jeba Anbiah) wrote:
Jon Kraft <jo*@jonux.co.uk> wrote: ng**********@rediffmail.com (R. Rajesh Jeba Anbiah) wrote:
> Jon Kraft <jo*@jonux.co.uk> wrote:
>>
>> You could use fsockopen (search for "POST" in the User Contributed
>> Notes): http://uk.php.net/fsockopen
>
> AFAIK, you cannot post data via fsockopen() to https server...
Since v4.3 there are different stream transports available (tcp, udp,
ssl..). If PHP is built with OpenSSL, you can use them, e.g.:
I see...
$fs = fsockopen("ssl://www.secureserver.com", 443);
http://uk.php.net/manual/en/transports.php
This manual page is not clear to me especially the "Table J-1.
Context options for ssl:// and tls:// transports (since PHP 4.3.2)"
There is no information about where to use the parameters like
"verify_peer". If you know more about the stuff, you may add some
useful user notes there---that will be really helpful to others.
I don't know, that stuff seems relatively new,
Yes. When I moved to PHP 4.3.1, I've looked at the changelog
which said fsockopen() can handle ssl://. I tried a lot, but it failed
--- I think, I've used a wrong port.
but I should think you'd
use them as additional directives in php.ini? Someone?
PS: On this page is an example of posting to a secure server (Example 2):
http://uk.php.net/manual/en/ref.stream.php
Thanks for pointing me this page. Nice example, but no info
about "certificates", "verify peer" stuffs.
I feel, cURL is so handy than this fsockopen() version.
---
"We live to die; we die to live"
Email: rrjanbiah-at-Y!com