Forum Moderators: coopster & phranque

Message Too Old, No Replies

cURL syntax?

trying to post data to https without using forms

         

Mitch888

4:15 pm on May 2, 2003 (gmt 0)

10+ Year Member



Hi,
I am integrating a credit card processing into my site. I am trying to post data to an https url. Any suggestions or other methods are welcome

I am trying to use cURL. Below is my syntax

$res = `/usr/bin/curl -m 120 -d "$data" '$url' `;

My ISP have cURL installed and the path to it is `/usr/bin/curl. The above syntax does not seem to work, any suggestions would be greatly appreciated.

Thank you

ShawnR

12:31 am on May 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think the problem may be due to the nesting quotation marks.

You are using single quotes around the $url, so that won't be expanded; the literal string '$url' will be passed. I think that is your main problem.

A second problem might be that the double quotes around $data are being stripped out... not sure, you may need to escape them. And of course, make sure that your $data is "url-encoded".

Shawn

hpche

5:50 pm on May 3, 2003 (gmt 0)

10+ Year Member



Is there a reason you don't want to use PHP's built in cURL functions - [php.net...] - instead? That would seem an easier way of doing things.

ShawnR

12:16 am on May 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>>"...That would seem an easier way of doing things.

And more portable.