Hello,

I am trying to post to a site that requires me to use a client cert.  I can
get it to work for both windows and unix, but only on the command line.  I
have tried without success to use the PHP built-in methods for doing this.
Here is the command line that works:

curl -d "<myxml>" -k -E myCert.pem:myPassword
https://www.mysite.com/Listener.exe

Any ideas of how to make this work with the curl_setopt methods?  I tried
variations of this:

        $ch = curl_init();
        curl_setopt ($ch, CURLOPT_URL, $url);
        curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
        curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 2);
        curl_setopt ($ch, CURLOPT_SSLKEY, 'myCert.pem');
        curl_setopt ($ch, CURLOPT_SSLKEYPASSWD, 'myPassword');

        $result = curl_exec ($ch);
Plus where does the data go?  I know there is the POST_FIELDS option but I
have XML.  Any thoughts?

Thanks,
Scott

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

Reply via email to