well when i try to work with curl through the shell it work fine without any
problems.... more then that when i use the curl with php at my server to
another page at my server its working fine also, just when i try to use it
through php it make the problems so i think that its installed, or i
mistake?

----- Original Message ----- 
From: "Marek Kilimajer" <[EMAIL PROTECTED]>
To: "Yonatan Ben-Nes" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, October 01, 2003 1:04 PM
Subject: Re: [PHP] CURL + https


> Did you compile php with openssl support?
>
> Yonatan Ben-Nes wrote:
>
> > Hi,
> >
> > I'm currently building an e-commerce site and I need to create the
connection between the site and the server which validate the credit card.
> > I'm trying to do it with CURL which will post all the information from a
secured page (https) to another secure page, the code that i succeded to
create so far is able to send from one secured page to another at my server
but from some reason isnt able to connect to the cc server, when i tried to
use curl through the shell i succeded to connect.
> >
> > The code that im trying is (i reduced the amount of variables for the
snippet):
> >  $OrderID = "OrderID=".$OrderID."&";
> >  $total = "total=".$total."&";
> >  $URL =
"URL=http://www.curtaincallproductions.com/ccall08/html/order/auth.phtml&";;
> >  $email = "email=".$b_email."&";
> >  $Cardnum1 = "Cardnum1=".$Cardnum[1]."&";
> >  $Cardnum2 = "Cardnum2=".$Cardnum[2]."&";
> >  $Cardnum3 = "Cardnum3=".$Cardnum[3]."&";
> >  $Cardnum4 = "Cardnum4=".$Cardnum[4]."&";
> >  $Cardname = "Cardname=".$Cardname;
> >
> >  $params =
$OrderID.$total.$URL.$email.$Cardnum1.$Cardnum2.$Cardnum3.$Cardnum4.$Cardnam
e;
> >  $params = str_replace(" ", "%20", $params);
> >  $user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
> >
> >  $ch =
curl_init('https://www.goemerchant7.com/cgi-bin/gateway/direct.cgi');
> >  curl_setopt($ch, CURLOPT_POST, 1); // make a regular post
> >  curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
> >  curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); //"user-agent" header
to be used
> >  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
> >  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
> >
> >  $result = curl_exec ($ch);
> >  curl_close ($ch);
> >  }
> >
> > Anyone know what can be the problem?
> > I also know that if i just create a static form which post to the cc
server the cc return me an error, with curl i cant know what is the error...
or can i?
> >
> > Thanks Alot in advance,
> > ------------------------------------------------------
> > "My friends are worth gold to me, so I prefer to sell them and get
rich!"
> >
> > Ben-Nes Yonatan
> > Canaan Surfing Ltd
> > Tel: 972-4-6991122
> > Fax: 972-4-6990098
> > http://sites.canaan.co.il
> > ------------------------------------------------------
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to