cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Problem with curl in PHP

From: Hugo Alexandre A. S. Dias <anikin_at_anikin-skywalker.com>
Date: Tue, 23 Dec 2003 14:02:19 -0000

Hi

I'm trying to use the following code:
$ch=curl_init();
curl_setopt($ch,CURLOPT_VERBOSE,1);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST,0);
curl_setopt($ch,CURLOPT_POSTFIELDS,$params);
curl_setopt($ch,CURLOPT_SSLCERT,"cert1266.pem");
curl_setopt($ch,CURLOPT_SSLCERTPASSWD,"123456");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$data = curl_exec($ch);
curl_close($ch);
echo $data;

But nothing returned.

When i use the command line tool
C:\web projects\escolaviva\pagamentos>curl -d
"A030=M005&A001=1266&C007=1234556555&C013=&A061=25.05&
A105=9782&C003=4151700000001051&C004=200505&C005=540&C001=0&C042=0" -G
--cert cert1266.pem:123456 ht
tps://cer.pnet.multibanco.pt/pvtn

This works.

I'm using Apache in Windows XP Home
The CURL Settings in PHP are: (as seen in PHPINFO())
curl
CURL support enabled
CURL Information libcurl/7.10.2 OpenSSL/0.9.7c

What am I doing wrong?

Thanks in advance for your help.

------------------------------------------------------------------------
------------
Hugo Alexandre Dias
Web-Programmer
E-mail: anikin_at_anikin-skywalker.com
ICQ # 7995052
MSN: anikin_jedi_at_hotmail.com
------------------------------------------------------------------------
------------
 

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-23