curl-and-php
Re: new authorize.net requirements
Date: Mon, 25 Nov 2002 12:22:23 -0500
Daniel... Wow, thanks for writing back. You are saving my life.
Here are answers to your questions...
System is cURL 7.9.4 on PHP 4.1.2 on Redhat Linux 6.2
(In case it matters, this is a Sun Cobalt box.)
No data whatsoever comes back when I connect using cURL at the command line.
Doesn't matter if I send any post values or not.
I can copy and paste the SSH page for you, but all you'll see is a line
where I execute the cURL statement and the next line where I CTRL-C it after
a couple minutes. But here it is, below. First I try to connect without any
post values. Then I try with the post values. Then I try to do a non-secure
connection. The only time I get anything at all is when I connect
non-secure, but it does prove somebody's listening, at least.
--------------------
[admin admin]$
[admin admin]$ curl https://secure.authorize.net/gateway/transact.dll
...nothing...
[admin admin]$ curl -d
"x_Amount=459.95&x_Card_Num=1111222233334444&x_Exp_Date=0304&x_Cust_ID=7064&
x_Invoice_Num=1038242852.7064"
https://secure.authorize.net/gateway/transact.dll
...nothing...
[admin admin]$ curl http://secure.authorize.net/gateway/transact.dll
<HTML>
<HEAD><TITLE>Firewall Error: Forbidden</TITLE></HEAD>
<BODY>
<H1>Forbidden</H1>
You are not permitted to access the remote system.
<p>
If this is an error, then you should contact your local firewall
administrator.
</body></HTML>
[admin admin]$
--------------------
Thanks incredibly much for looking at this.
John C
----- Original Message -----
From: "Daniel Stenberg" <daniel_at_haxx.se>
To: "curl and php list" <curl-and-php_at_lists.sourceforge.net>
Sent: Monday, November 25, 2002 11:47 AM
Subject: Re: new authorize.net requirements
> On Mon, 25 Nov 2002, John Clendinen wrote:
>
> > But when we simulate that same form posting using cURL, the PHP script
> > containing the cURL execute is timing out.
>
> Doing a single simple POST to a https site? What curl version, what php
> version on which operating system?
>
> > So, logically, I tried connecting to the same page using cURL from the
> > command line, and it seems to establish a socket but then just sits
there.
> > Never closes the connection until I break it. This too is useless.
>
> If curl can't do it from the command line, then don't expect it to do it
> correct from within PHP.
>
> I'd recommend getting the command line version to work first.
>
> Could you perhaps show us how such a command line looks like? How much
date
> does curl receive or doesn't it receive anything at all?
>
> > Some more info: The URI to which cURL is connecting (or supposed to be
> > connecting) is secure, https, port 443. If I run the same PHP script
> > mentioned above but specify non-secure port 80, I get plenty of
response --
> > the standard forbidden/rejection response. I get a similar reaction if I
> > try to open a socket -- whether port 443 or port 80 -- using
fsockopen(),
> > fputs, and fgets.
>
> Well, the port number surely doesn't matter, the protocol does. HTTP can
be
> spoken on 80 or 443 if you want to, and so can HTTPS. But usually we keep
> HTTP on 80 and HTTPS on 443. When you do "fsockopen" on 443, that's like
> putting curl to speak HTTP on 443.
>
> If that works, it would seem like the site doesn't run SSL on that port.
>
> > Naturally, when I call A.net on the phone for support, they seem annoyed
> > and assure me it's not their problem.
>
> Nothing beats a friendly staff! ;-(
>
> --
> Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
>
>
-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
Received on 2002-11-25