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

curl-and-php

curl+perl to curl+php

From: Helene Veilleux <hveilleux_at_abprix.com>
Date: Mon, 30 May 2005 10:55:27 +0200

Hello,

I am totaly newbies in CURL handle and i have some trouble to converte
a curl+perl script toa curl+php script :

<?php
// Curl + PERL
/*
$run_curl = system(
"\"c:/program files/cURL/curl.exe\"
--cacert \"c:/program files/cURL/curlcert.pem\"
--output \"upload_results.txt\"
--cookie \"session-id=<cookie value>; session-id-time=<cookie value>;
ubid-main=<cookie value>\"
--header \"Authorization: Basic (base64 encoded{<email
address>:<password>})\"
--header \"Content-type: text/xml\"
--header \"UploadFor: Marketplace\"
--header \"FileFormat: TabDelimited\"
--data-binary @c:/datafeeds/amazon.txt
https://vendornet.amazon.co.uk/exec/panama/seller-admin/catalog-upload/add-modify-delete
");
*/

// Curl + PHP

$ch = curl_init($urlToPostTo);
curl_setopt($ch, CURLOPT_FILE, $amazon_curl);

$headerhttp=array()
array_push($headerhttp, "Authorization: Basic (base64 encoded{<email
address>:<password>})", "Content-type: text/xml","UploadFor:
Marketplace","FileFormat: TabDelimited");
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);

$headercookie=array()
array_push($headercookie, "Set-Cookie: session-id=<cookie value>;
session-id-time=<cookie value>; ubid-main=<cookie value>");
curl_setopt($ch, CURLOPT_COOKIE, "$headercookie);

curl_exec($ch);
curl_close($ch);

?>

I havent found the translation for the line "--cacert \"c:/program
files/cURL/curlcert.pem\"" in the php curllib .....

I am wainting for you 'r advices.

Helene veilleux
Received on 2005-05-30