hi, i try to install paypal IPN page, here is my code: $req = "cmd=_notify-validate"; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req.= "&$key=$value"; } $header = "POST /cgi-bin/webscr HTTP/1.1\r\n"; // HTTP POST request $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30); if(!$fp){ //no conn die(); } //post data back fputs($fp, $header . $req); while(!feof($fp)){ $res=fgets($fp, 1024); if (strcmp(trim($res), "VERIFIED") == 0) { // do something }else{ // send error Email } i'm allways reveiving the error mail, so the $res is allways INVALID. An idea?
... View more