| | |
Fread + Ssl
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: May 2005
Posts: 2
Reputation:
Solved Threads: 0
Hi,
Im having a slight problem with fgets and ssl.
Fgets throws an error at me.
Is there something obvious that ive done wrong?
Apache is settup correctly and php is compiled with ssl support.
Im having a slight problem with fgets and ssl.
PHP Syntax (Toggle Plain Text)
<?php function monkey($method,$protocal,$port,$domain,$path,$data,$query){ if($method=="POST"){ $fp = fsockopen($protocal."://".$domain, $port, $errno, $errstr, 30); if (!$fp) { echo $errstr." (".$errno.")<br />\n"; } else { $out .= "POST /".$path."?".$query." HTTP/1.1\r\n"; $out .= "Host: ".$domain."\r\n"; $out .= "Content-Type: application/x-www-form-urlencoded\r\n"; $out .= "Content-Length: " . strlen($req) . "\r\n"; $out .= "Connection: Close\r\n\r\n"; $out .= $req; fputs ($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } } } $data['foo']="Hello Post data"; monkey("POST","ssl","443","domaingoeshere.com","",$data,"a=blag"); ?>
Fgets throws an error at me.
Is there something obvious that ive done wrong?
Apache is settup correctly and php is compiled with ssl support.
Last edited by John Smith; May 13th, 2005 at 5:20 am. Reason: Ooops
•
•
Join Date: May 2005
Posts: 2
Reputation:
Solved Threads: 0
When connecting to hotmail I get this error:
(Through POST and SSL)
(1)HTTP/1.1 200 OK
(2)Cache-Control: no-cache
(3)Pragma: no-cache
(4)Content-Length: 312
(5)Content-Type: text/html
(6)Expires: Fri, 13 May 2005 08:33:37 GMT
(7)Server: Microsoft-IIS/6.0
(8)PPServer: PPV: 25 H: TK2PPMLOG2B03 V: 1192
(9)cachecontrol: no-store
(10)P3P: CP="DSP CUR OTPi IND OTRi ONL FIN"
(11)Date: Fri, 13 May 2005 08:34:36 GMT
(12)Connection: close
(13)
<br />
<b>Warning</b>: fgets(): SSL: fatal protocol error in <b>/home/william/public_html/hotmail.php</b> on line <b>46</b><br />
(14)<HTML><HEAD>.... (page content)
(Through POST and SSL)
(1)HTTP/1.1 200 OK
(2)Cache-Control: no-cache
(3)Pragma: no-cache
(4)Content-Length: 312
(5)Content-Type: text/html
(6)Expires: Fri, 13 May 2005 08:33:37 GMT
(7)Server: Microsoft-IIS/6.0
(8)PPServer: PPV: 25 H: TK2PPMLOG2B03 V: 1192
(9)cachecontrol: no-store
(10)P3P: CP="DSP CUR OTPi IND OTRi ONL FIN"
(11)Date: Fri, 13 May 2005 08:34:36 GMT
(12)Connection: close
(13)
<br />
<b>Warning</b>: fgets(): SSL: fatal protocol error in <b>/home/william/public_html/hotmail.php</b> on line <b>46</b><br />
(14)<HTML><HEAD>.... (page content)
![]() |
Similar Threads
- In Need of an SSL (eCommerce)
- Ssl Outlook Problem (Windows NT / 2000 / XP)
- Netgear WGR614 v4 problem with SSL sites... (Networking Hardware Configuration)
- fread problem? (C)
- msn messenger not working.. SSL (Windows NT / 2000 / XP)
Other Threads in the PHP Forum
- Previous Thread: compatible PHP db
- Next Thread: I think this is a php problem?
Views: 2526 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download duplicates dynamic echo email error execution file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link links login loop mail menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote replace script search select server session sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube





