Re: fsockopen https problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maycon de Oliveira wrote:
> Hi, i have problem in my script, this error is Permission Danied (13)
>
> <?
>
> $host = "193.132.139.36";
>
> $port = 443;
>
> $path = "/gatekeeper/ink/quexry.asp"; //or .dll, etc. for authnet, etc.
>
> $fp = fsockopen("https://".$host, $port, $errno, $errstr, $timeout = 10);

You can't just open up a socket on port 443 to a secure server and start
sending/getting data.

The whole point of SSL is that you need to provide a half of an SSH
key-pair, and get half of their key-pair, then you each generate a
key-pair from your secret half key-pairs, and then you swap those so you
each know the other has the secret half of the key-pair they gave you,
then you can send a new unique key-pair to encrypt/decrypt the data, and
then you can start sending the username/password back and forth safely to
be logged in, and then you can kiss each other...

You could, in theory, develop all of the code to implement this protocol
for yourself and use fsockopen as you are.

But it would be *WAY* mo' betta to just use this:

http://php.net/curl

Have fun.

PS Keep all the urlencode stuff you have -- That's all good.  Just the
fsockopen bit needs to change.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux