הרשם שאלות ותשובות רשימת חברים לוח שנה חיפוש הודעות מהיום סמן פורומים כנקראו

   
|!|

 
 
כלים לאשכול תצורת הצגה
Prev הודעה קודמת   הודעה הבאה Next
ישן 29-11-10, 15:24   # 1
MasterNetwork
עסק רשום [?]
 
מיני פרופיל
תאריך הצטרפות: Jun 2007
הודעות: 653

MasterNetwork לא מחובר  

PHP| בעיה בSSL Socket - PayPal

אני מנסה לקרוא אתר כלשהוא בעל אבטחת SSL ויש לי בעיות בחיבור אליו.

זה השגיאה:
קוד:
HTTP/1.1 400 Bad Request
Date: Mon, 29 Nov 2010 13:32:55 GMT
Server: Apache
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>
וזה חלק מהקוד של הפונקציה לשליחה:

קוד:
$host = 'ssl://www.paypal.com';
$socket = fsockopen($host,443,$errno,$errstr,30);
if ( $socket )
{
    $request = "GET {$path} HTTP/1.1\r\n";
    $request .= "Host: {$host}\r\n";
    $request .= "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; he; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729)\r\n";
    $request .= "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n";
    $request .= "Accept-Language: he,en-us;q=0.7,en;q=0.3\r\n";
    $request .= "Accept-Encoding: gzip,deflate\r\n";
    $request .= "Accept-Charset: windows-1255,utf-8;q=0.7,*;q=0.7\r\n";
    $request .= "Keep-Alive: 115\r\n";
    $request .= "Connection: keep-alive\r\n";
    $request .= "Cookie: {$cookies}\r\n";
    $request .= "Connection: close\r\n\r\n";
    fwrite($socket,$request);
$info="";
    while ( !feof($socket) )
    {
        $info .= fgets($socket,128);
    }
return $info;
    fclose($socket);
}
  Reply With Quote
 

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 

כלים לאשכול
תצורת הצגה

חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 09:58.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ