Re: Https

From: Date: Wed, 11 Oct 2000 04:58:58 +0000
Subject: Re: Https
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-3125@lists.php.net to get a copy of this message
I don't know witch PHP version you have, but I don't think that fsockopen works with https yet. You may have to use cURL.. Alain On Wed, Oct 11, 2000 at 12:22:14AM -0400, Ryan Sexton wrote: > Hello, > I'm having problems with using fsockopen to post to an httpS site. i'm > using port 443, and all I'm getting is a very long very very long pause. I'm > trying to write a small script out to work with authorizenet/creditcard > transactions and i can't establish a secure connection, i assumed that i > could with fsockopen, but all i get is a pause and after awhile it just > gives me a timeout error. Has anyone found a way to get this working? maybe > i'm doing something wrong, heres my script: > ---------------------------------------------------------codestart: > $fp = fsockopen("www.domain.com", 443); > if($fp){ > $request_form= "x_ADC_Delim_Data=TRUE"; > $header = "POST /file.html HTTP/1.0\r\n"; > $header .= "User-Agent: php-authorizenet-validator-HTTP_POST/1.0 \r\n"; > $header .= "Content-type: application/x-www-form-urlencoded\r\n"; > $header .= "Content-length: " . strlen($request_form) . "\r\n\r\n"; > > fputs($fp, $header . $request_form); > while (!feof($fp)) { $response_form .= fgets($fp, 128); } > > fclose($fp); > } > ---------------------------------------------------------codeend: > So i've got it down to the while statement, when i attempt to try and output > the returned data, it fails. am i approaching this wrong since it's ssl? any > help would be greatly appreciated. > > > Ryan Sexton > rsexton@buckeye-express.com > > ps. I'm sorry if i'm covering an old topic, I am new to this group, please > accept my appologies if i haven't done my homework enough. > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.windows (#3125) next »