--- lm_paypal.module	2007-02-24 17:34:52.000000000 +0200
+++ lm_paypal2.module	2008-06-13 19:04:37.000000000 +0300
@@ -623,7 +623,9 @@ function lm_paypal_ipn_in() {
   $ph .= "Content-Type: application/x-www-form-urlencoded\r\n";
   $ph .= "Content-Length: " . strlen($req) . "\r\n\r\n";
 
-  $fp = fsockopen($_lm_paypal_host, 80, $errno, $errstr, LM_PAYPAL_VALIDATE_TIMEOUT);
+  $_lm_paypal_host = 'ssl://'.$_lm_paypal_host;
+  $port = '443';  
+  $fp = fsockopen($_lm_paypal_host, $port, $errno, $errstr, LM_PAYPAL_VALIDATE_TIMEOUT);
   if (!$fp) {
     watchdog(LM_PAYPAL, t('Cannot validate with host: %host', array('%host' => check_plain($_lm_paypal_host))), WATCHDOG_ERROR);
     // Return an HTTP error and hopefully PayPal will resend the ipn to me
