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

curl-and-php

Re: Call curl -v option from PHP program

From: santi wang <smu_research_at_yahoo.com>
Date: Fri, 27 Oct 2006 13:56:37 -0700 (PDT)

Michael,
   
  It works!! Thank you very much. What does 2>&1 do though? I'm just very curious.
  Oh, one more thing that I didn't get to mention and I think that you might know. I'm unable to just use "curl -v https://... ", it'll prompt a message window saying "curl.exe has encountered a problem and needs to close." So I have to force it to use SSLv3 by doing "curl -v -3 https://...", but the output displays both SSL certificate information and HTML code which is not exactly what I need. I just want to get the certificate information. Do you know why and how to fix it?
   
  Thank you very much for your help,
   
  Santi

Michael Wallner <mike_at_iworks.at> wrote:
  santi wang wrote:
> Hello All:
>
> Has anyone ever called curl -v option (e.g., curl -v https://
> securedwebsite.com) from PHP program? I'm having problem getting the
> output (certificate information). I try using both exec() and system()
> functions in PHP, it just doesn't give the output at all.
> However, when I tried it with other curl commands and it seemed to work
> okay such as curl -h, curl -3 https://..., or curl -I https://...)
> Does anyone know why?

Probably because messages go to stderr? Try `curl -v ... 2>&1`

Regards,

-- 
Michael
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
 
---------------------------------
Get your email and see which of your friends are online - Right on the  new Yahoo.com

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2006-10-27