<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel about="http://blog.gmane.org/gmane.comp.web.curl.php">
    <title>gmane.comp.web.curl.php</title>
    <link>http://blog.gmane.org/gmane.comp.web.curl.php</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3139"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3138"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3136"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3135"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3132"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3131"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3129"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3123"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3110"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3109"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3096"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3086"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3084"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3082"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3080"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3079"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3077"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3076"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3073"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.web.curl.php/3072"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3139">
    <title>Embedding a web page into a PHP page</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3139</link>
    <description>I have embedded a cgi web application into a PHP page as follows:

&lt;?php
$remote = fopen("http://127.0.0.1/my_site/DailyComics.cgi", "r");
fpassthru($remote);
?&gt;

Everything looks good, the comics are embedded nicely into my PHP page.  

Please note that the cgi does not produce &lt;html&gt;, &lt;head&gt;, &lt;body&gt; tags (since 
the PHP application puts them where required).

My questions are:

1) Am I using the correct syntax to embed the cgi into the PHP page?

2) The cgi application is returning the HTTP response below.  Is this ok or do 
we have to modify something?  See below:

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Tue, 02 Dec 2008 15:14:32 GMT
Content-Type: text/html
Connection: Keep-Alive
Content-Length: 1054

Thank you very much,

Jeff


_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

</description>
    <dc:creator>Jeff Dunlap</dc:creator>
    <dc:date>2008-12-02T16:36:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3138">
    <title>trying to simulate login to UPS (willing to $pay$ for solution)</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3138</link>
    <description>_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
</description>
    <dc:creator>Vadim_ghk</dc:creator>
    <dc:date>2008-12-01T09:03:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3136">
    <title>sending POST data to remote server</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3136</link>
    <description>Hi,

I have a problem with sending data to remote server. Actually, not to 
every remote server so I want to ask if there are any conditions for 
that remote server which have to be obey like that remote server have to 
have switched on curl extension too or something like that. My source 
code is :

  $ch = curl_init("http://byt.sk/inzeraty-byty-predam.php");

  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  curl_setopt($ch, CURLOPT_HEADER, TRUE);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
  curl_setopt($ch, CURLOPT_POST,TRUE);
  $postData = array("_id_kraj"=&gt;"100",
                    "_strPrev"=&gt;"50",
                    "_strFrst"=&gt;"0",
                    "_strNext"=&gt;"150",
                    "_strLast"=&gt;"11253",
                    "_btnNext"=&gt;"+50+&gt;+");
  $post = 
"_id_kraj=100&amp;_strPrev=50&amp;_strFrst=0&amp;_strNext=150&amp;_strLast=11255&amp;_btnNext=+50+&gt;5";
  curl_setopt($ch, CURLOPT_POSTFIELDS,$post);

  $result  = curl_exec($ch);
  echo $result;

Several names of variables are in Slovak, but it isn't importat what 
they mean. When I execute it firebug shows me error "Permission denied 
to call method
Location.toString". It doesn't show up when I try to send POST data to 
my server where I'm sure that curl is installed.

Thanks,
elf
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

</description>
    <dc:creator>Lukas Polak</dc:creator>
    <dc:date>2008-11-30T19:53:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3135">
    <title>Help debugging Curl PHP script when downloading PDF</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3135</link>
    <description>_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
</description>
    <dc:creator>Rick Rodriguez</dc:creator>
    <dc:date>2008-11-23T14:11:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3132">
    <title>Introduction and first question</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3132</link>
    <description>Hi,

I am fairly new to curl, I have done simple file transfers with it in
the past, but that's it.
Now I am trying something else:

I need to log in to an OWA Exchange Server (MS-Exchange 2007) and
download an attachment from a specific message.

At the moment I am finding bits and pieces of information here and
there, so I am looking for pointers and similar examples.


I am using curl 7.16.4 on the command.

Here's my current script:

curl -v --cacert /home/mritzkowski/curl/cacert.pem -s -b cookies.txt
-c cookies.txt -A "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT
5.0)" -L https://webmail.company.com/owa/auth/logon.aspx?url=https://webmail.company.com/owa/&amp;reason=0
-d username=username -d password=password -d
destination=https://webmail.company.com/owa/ -d flags=0 -d
forcedownlevel=0 -d isUtf8=1 -d SubmitCreds=Log%20On -d
https://webmail.company.com/owa/

I get this output:

 * About to connect() to webmail.company.com port 443 (#0)
*   Trying 172.27.13.63... connected
* Connected to webmail.company.com (172.27.13.63) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /home/mritzkowski/curl/cacert.pem
  CApath: none
* SSLv2, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using AES128-SHA
* Server certificate:
*        subject: /C=US/O=webmail.company.com/OU=GT35868496/OU=See
www.geotrust.com/resources/cps (c)08/OU=Domain Control Validated -
QuickSSL(R)/CN=webmail.company.com
*        start date: 2008-09-19 15:46:54 GMT
*        expire date: 2010-09-20 15:46:54 GMT
*        common name: webmail.company.com (matched)
*        issuer: /C=US/O=Equifax Secure Inc./CN=Equifax Secure Global
eBusiness CA-1
* SSL certificate verify ok.
&lt; HTTP/1.1 200 OK
&lt; Cache-Control: no-cache
&lt; Pragma: no-cache
&lt; Content-Length: 8344
&lt; Content-Type: text/html; charset=utf-8
&lt; Expires: -1
&lt; Server: Microsoft-IIS/7.0
&lt; X-AspNet-Version: 2.0.50727
&lt; X-OWA-Version: 8.1.291.1
&lt; X-Powered-By: ASP.NET
&lt; Date: Fri, 21 Nov 2008 17:11:34 GMT
&lt;
&lt;!-- Copyright (c) 2006 Microsoft Corporation.  All rights reserved. --&gt;
&lt;!-- OwaPage = ASP.auth_logon_aspx --&gt;




I think I am stuck at the login screen ...
Where to go from here?


Thanks for any help or pointers!
Matthias Ritzkowski
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

</description>
    <dc:creator>Matthias Ritzkowski</dc:creator>
    <dc:date>2008-11-21T17:16:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3131">
    <title>PHP - Curl and Multipart Form File Upload</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3131</link>
    <description>Hello,
I'm new to PHP but I've spent a lot of time looking and trying.
My goal is to write a php script that would take a file and upload it
to an image host website through the use of multipart form post.

I've read on the php.net site and tried their examples, 1 of them with
fsockopen, that totally didn't work. Now I'm trying curl, and I'm
running into the problem where I get something like this:


* About to connect() to www.imageboo.com port 80 (#0)
*   Trying 67.159.45.97... * connected
* Connected to www.imageboo.com (67.159.45.97) port 80 (#0)
Host: www.imageboo.com
Accept: */*
Content-Length: 157
Expect: 100-continue
Content-Type: multipart/form-data;
boundary=----------------------------8d605df41713

&lt; HTTP/1.0 200 OK
&lt; Date: Fri, 21 Nov 2008 03:58:28 GMT
&lt; Server: Apache/1.3.41 (Unix) PHP/5.2.5 mod_perl/1.30
mod_log_bytes/1.2 mod_bwlimited/1.4 mod_auth_passthrough/1.8
mod_ssl/2.8.31 OpenSSL/0.9.8b
&lt; X-Powered-By: PHP/5.2.5
&lt; Cache-Control: no-cache, must-revalidate
&lt; Expires: Mon, 26 Jul 1997 05:00:00 GMT
&lt; Content-Type: text/html
&lt; X-Cache: MISS from serv1.submitfly.com
&lt; Via: 1.0 serv1.submitfly.com:80 (squid/2.6.STABLE16)
&lt; Connection: close
* Closing connection #0


The picture.jpg exists, but for some reason the "Content-Type:
multipart/form-data;
boundary=----------------------------8d605df41713" cuts off, I assume
picture data supposed to follow the boudary id?

Here is the code I'm using to try and post the image to this host:


&lt;?php
//HTML form field for multipart/form-data is here
http://www.imageboo.com/index.php
$docurl = curl_init();
curl_setopt($docurl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($docurl, CURLOPT_URL, "http://www.imageboo.com/upload.php");
curl_setopt($docurl, CURLOPT_VERBOSE, 1);
curl_setopt($docurl, CURLOPT_HEADER, 1);
curl_setopt($docurl, CURLOPT_POST, 1);
curl_setopt($docurl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($docurl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($docurl, CURLOPT_POSTFIELDS, array("userfile"=&gt;"{&lt; at &gt;picture.JPG}"));
$webpage = curl_exec($docurl);
echo "$webpage";
curl_close($docurl);
?&gt;

Here is what I read on mailarchives here, PHP doesn't handle multipart
posts correctly, correct?, instead should use formadd with
CURLOPT_HTTPPOST and CURLFORM_FILE, HOWEVER these commands do not
exist in the PHP interface, so how can I upload images using multipart
form post? What am I doing wrong, has anyone come up with these
solutions or used such methods?

I've spent a couple of days trying to figure this out and so far :(
only switched over to using curl instead of fsockopen, and I don't
know how to use curl very well. It is important that the code be PHP,
because it needs to be run inside or as a script for integration.

Thank you very much.
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

</description>
    <dc:creator>Andrey Kuznetsov</dc:creator>
    <dc:date>2008-11-21T04:10:08</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3129">
    <title>Javascript and Curl?</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3129</link>
    <description>_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
</description>
    <dc:creator>Andre Lopes</dc:creator>
    <dc:date>2008-11-16T19:27:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3123">
    <title>Curl error 7 while accessing a subdomain</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3123</link>
    <description>_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
</description>
    <dc:creator>Rakhy Sunny</dc:creator>
    <dc:date>2008-11-14T18:36:37</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3110">
    <title>Sending a XML using Curl</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3110</link>
    <description>_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
</description>
    <dc:creator>Quad is Activating</dc:creator>
    <dc:date>2008-11-12T08:47:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3109">
    <title>pecl-http curl-related compile errors</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3109</link>
    <description>_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
</description>
    <dc:creator>Sam Sexton</dc:creator>
    <dc:date>2008-11-11T12:10:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3096">
    <title>open_basedir and curl</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3096</link>
    <description>_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
</description>
    <dc:creator>curl</dc:creator>
    <dc:date>2008-11-06T09:38:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3086">
    <title>How to download a file that has no extension in url? or bypassdownload prompt?</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3086</link>
    <description>_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
</description>
    <dc:creator>Jo Anonymous</dc:creator>
    <dc:date>2008-11-03T14:57:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3084">
    <title>Support for latest features in php</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3084</link>
    <description>_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
</description>
    <dc:creator>Jeff Wolkove</dc:creator>
    <dc:date>2008-11-03T00:45:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3082">
    <title>which is the way to obtain a web page across a form</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3082</link>
    <description>_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
</description>
    <dc:creator>Rafael De_Linares</dc:creator>
    <dc:date>2008-11-01T10:22:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3080">
    <title>curl error 6 Couldn't resolve host in PHP</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3080</link>
    <description>Hi,

Have been trying to get curl working on our new server and redesigned 
site.  Server is openBSD4.3, php and curl installed from packages.  PHP 
version 5.2.5, curl version libcurl/7.17.1 OpenSSL/0.9.7j zlib/1.2.3 
libidn/1.1.

Trying to connect to a credit card processing company's testbed 
environment, however curl seems to never be able to resolve the hostname 
when run through PHP.  I have been able to telnet and ping the hostname 
and it has resolved without issue.  Was even able to resolve and connect 
when I just ran curl on the command line just fine.  The problem only 
seems to be when trying to use the PHP curl implementation.  Have been 
searching on google and a little bit on the archives for possible 
solutions and come up empty.  All solutions I have found degraded to 
"it's your hosting company, their DNS is broken" however, this is an 
internal server and the only thing having trouble resolving dns is this 
webserver and ONLY when trying to use curl in PHP.

Code is as follows, pretty straightforward (leaving out url for security 
reasons, but url is properly formed, I have tested it):

  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL,$url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  curl_setopt($ch, CURLOPT_VERBOSE, 1);
  curl_setopt ($ch, CURLOPT_HEADER, 0);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS,$dataToSend);
  curl_setopt($ch,CURLOPT_TIMEOUT,$gArray['CLIENT_TIMEOUT']);
  curl_setopt($ch,CURLOPT_USERAGENT,$gArray['API_VERSION']);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

  $response=curl_exec ($ch);

I doubt seeing the code will help, but thought I would be thorough.  Has 
anyone ever come across this issue and perhaps managed to stumble across 
a solution?  It's rather irritating as our current live site works fine, 
but the versions and install conditions I am sure are totally different 
and hard to replicate at this point.
Thanks in advance for any replies!

</description>
    <dc:creator>Adam Stelmack</dc:creator>
    <dc:date>2008-10-31T18:36:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3079">
    <title>passing data back from curl callbacks in php</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3079</link>
    <description>Hello,

i've been using libcurl in C programs before, but now i'm trying to use the php
binding to do similar stuff, and i'm running into the following issue:

- libcurl uses callbacks to pass received headers and data back to the application
- the callbacks can be set with the php api

- with the C api, a userdata pointer (CURLOPT_READDATA) is passed to the callback,
  also you can store userdata in the curl handle (CURLOPT_PRIVATE) which is
  available from inside the callback by using getopt on the handle...
- in the php api those two are missing?!?

so, with the php api, it seems that the only way to pass results of processing the
data or headers back to the application from within the callbacks is using global
variables, which is really ugly...

am i missing something maybe?

(if you can't see the relevance:
i'm writing a function that passes through data from a remote server, but in the
case that the headers indicate an error, i need to pass control back to the caller
(by returning an error message).
that error would be detected in the headerfunction, but there's no way to pass a
message from there back to the point where curl_exec was invoked, other than by
setting a global variable.
if it was possible to pass a variable reference using READDATA or PRIVATE, that
could be used.
a similar problem would be trying to store cookies from the headers, for example)

Greetings,
 Thorben Thuermer
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

</description>
    <dc:creator>Thorben Thuermer</dc:creator>
    <dc:date>2008-10-29T15:16:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3077">
    <title>Cookies: Desperately Need Help</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3077</link>
    <description>Hello all,

Can anyone provide a different view on why cURL sends 2 extra cookies that don't belong (seem) to belong to the target domain and don't get sent when using a browser. I apologize for the long content to follow. It is my hope that someone will see the glitch. Btw, I'm an airline pilot, doing this for fun and to make computer life easier???

The background is that I use 3 php/curl pages to accomplish a task normally taking more steps and lots of useless data. The first page performs 13 curl transfers, to include login, and successfully gets the proper data. Selecting an item on this page requests the second page with only 1 curl transfer and also successfully gets the correct response. Then, requesting the 3rd page,which conducts 16 curl requests, there are 2 cookies that get sent, and it is my guess that this causes the server to respond differently. The primary emphasis is this help request is the presence of these 2 cookies being sent by curl. These two are: 

portalNRTP=10%2F23%2F2008+8%3A57%3A29+AM; portalUser=00354611; (see the next block for where they are set)

They are received and set during 1st (ok) page as shown in the verbose output:

* Closing connection #2
* Connection (#2) was killed to make room (holds 6)
* About to connect() to www.jetnet.aa.com port 443 (#2)
*   Trying 216.39.75.19... * connected
* Connected to www.jetnet.aa.com (216.39.75.19) port 443 (#2)
* successfully set certificate verify locations:
*   CAfile: /usr/share/ssl/certs/ca-bundle.crt
  CApath: none
* SSL re-using session ID
* SSL connection using RC4-MD5
* Server certificate:
*      subject: /C=US/ST=Texas/L=Fort Worth/O=American Airlines Inc./CN=www.jetnet.aa.com
*      start date: 2008-05-13 13:27:16 GMT
*      expire date: 2009-05-29 15:26:09 GMT
*      common name: www.jetnet.aa.com (matched)
*      issuer: /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/emailAddress=premium-server&lt; at &gt;thawte.com
* SSL certificate verify ok.
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13
Host: www.jetnet.aa.com
Referer: https://www.jetnet.aa.com/jetnet/sso/sso.asp
Cookie: ASPSESSIONIDSARTBADQ=MINIFLBABMJKIPAAHKIHLOKL; SMSESSION=LBMOvPsLIcj4PqZZ...[omitted]...U8HwPW7RM; ASPSESSIONIDSCRTBBCQ=AGLOFLBAHMAFAOHFDPIKBKNA; SMIDENTITY=mKK82qk0n4j5k021.....[omitted].....ggtNzsylyu07j8xw==; FGNCLIID=febiucsmzq0pzpi5fsvzpxiswg4; BIGipServerPortal_80_Green=3624160778.20480.0000
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Content-Length: 22
Content-Type: application/x-www-form-urlencoded

&lt; HTTP/1.1 302 Object moved
&lt; Cache-control: private
&lt; Content-Type: text/html
&lt; Date: Thu, 23 Oct 2008 13:57:28 GMT
&lt; Date: Thu, 23 Oct 2008 13:57:28 GMT
&lt; Expires: Thu, 23 Oct 2008 13:56:28 GMT
&lt; Location: ../communities/community.asp?CommunityID=203&amp;intCurrentPageIndex=0&amp;UserID=64953
&lt; Server: Microsoft-IIS/5.0
&lt; Server: Microsoft-IIS/5.0
* Replaced cookie SMSESSION="ukHumhb20......[omitted.....Fx3gLObI7" fo&lt; Set-Cookie: SMSESSION=ukHumhb20.....Fx3gLObI7; path=/; domain=.aa.com
* Replaced cookie SMSESSION="ukHumhb20......[omitted.....Fx3gLObI7" fo&lt; Set-Cookie: SMSESSION=ukHumhb20.....Fx3gLObI7; path=/; domain=.aa.com
* Added cookie GroupMemberships="GroupMem%3A%7B51%7D%7B201%7D%7B202%7D%7B363%7D%7B449%7D%7B598%7D%7B614%7D" for domain www.jetnet.aa.com, path /jetnet, expire 0
&lt; Set-Cookie: GroupMemberships=GroupMem%3A%7B51%7D%7B201%7D%7B202%7D%7B363%7D%7B449%7D%7B598%7D%7B614%7D; path=/jetnet
 [omitted]
* Added cookie portalUser="00354611" for domain aa.com, path /, expire 0
&lt; Set-Cookie: portalUser=00354611; domain=.aa.com; path=/
[omitted]
* Added cookie portalNRTP="10%2F23%2F2008+8%3A57%3A29+AM" for domain aa.com, path /, expire 0
&lt; Set-Cookie: portalNRTP=10%2F23%2F2008+8%3A57%3A29+AM; domain=.aa.com; path=/
[omitted]
* Replaced cookie BIGipServerPortal_80_Green="3624160778.20480.0000" for domain www.jetnet.aa.com, path /, expire 1224777520
&lt; Set-Cookie: BIGipServerPortal_80_Green=3624160778.20480.0000; expires=Thu, 23-Oct-2008 15:58:40 GMT; path=/
&lt; X-Powered-By: ASP.NET
&lt; X-Powered-By: ASP.NET
&lt; Connection: Keep-Alive
&lt; Content-Encoding: deflate
&lt; Transfer-Encoding: chunked

Here is the curl setopt's for the beginning of the last and troubling page of the transfer (they change for 2-3 post requests) :

$header_array[] = "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
$header_array[] = "Accept-Language: en-us,en;q=0.5";
$header_array[] = "Accept-Encoding: gzip,deflate";
$header_array[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
$header_array[] = "Keep-Alive: 300";
$header_array[] = "Connection: keep-alive";

$ch1 = curl_init();

curl_setopt($ch1, CURLOPT_MAXCONNECTS, 16);
curl_setopt($ch1, CURLOPT_USERAGENT, $WEBBOT_NAME);      // See above Go Stealthy
curl_setopt($ch1, CURLOPT_SSL_VERIFYPEER, FALSE);        // Needed for https: &amp; no certificate       
curl_setopt($ch1, CURLOPT_TIMEOUT, CURL_TIMEOUT);
curl_setopt($ch1, CURLOPT_URL, $target);                 // Define target site
curl_setopt($ch1, CURLOPT_REFERER, $ref);                // Define refering page 
curl_setopt($ch1, CURLOPT_CONNECTTIMEOUT, 35);
   curl_setopt($ch1, CURLOPT_DEBUGFUNCTION, TRUE);
   curl_setopt($ch1, CURLOPT_VERBOSE, TRUE);
   curl_setopt($ch1, CURLOPT_STDERR, $fp);
curl_setopt($ch1, CURLOPT_NOPROGRESS, FALSE);
curl_setopt($ch1, CURLOPT_HTTPHEADER, $header_array);    // Send Accept: Header values
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, TRUE);         // Return page in String
curl_setopt($ch1, CURLOPT_COOKIESESSION, FALSE);
curl_setopt($ch1, CURLOPT_COOKIEJAR, $cookie_file);      // Where to WRITE cookies
curl_setopt($ch1, CURLOPT_COOKIEFILE, $cookie_file);     // Where to READ cookies FROM
# curl_setopt($ch1, CURLOPT_COOKIE, $cookie);              // Send specific cookie
curl_setopt($ch1, CURLOPT_HEADER, TRUE);
curl_setopt($ch1, CURLOPT_NOBODY, TRUE);
curl_setopt($ch1, CURLOPT_POST, FALSE);                    // Use GET Method

curl_setopt($ch1, CURLOPT_FRESH_CONNECT, TRUE);        // Do NOT Force New Cache connection
# curl_setopt($ch1, CURLOPT_FOLLOWLOCATION, TRUE);
# curl_setopt($ch1, CURLOPT_ENCODING, "deflate");        // Attempt to Fix 'Content-Encoding: Deflate issue

And the verbose output from one example request:

* About to connect() to nrtp.jetnet.aa.com port 443 (#0)
*   Trying 216.39.75.28... * connected
* Connected to nrtp.jetnet.aa.com (216.39.75.28) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /usr/share/ssl/certs/ca-bundle.crt
  CApath: none
* SSL re-using session ID
* SSL connection using RC4-MD5
* Server certificate:
*      subject: /C=US/ST=Texas/L=Fort Worth/O=American Airlines Inc./CN=nrtp.jetnet.aa.com
*      start date: 2008-08-01 20:58:30 GMT
*      expire date: 2010-08-01 20:58:30 GMT
*      common name: nrtp.jetnet.aa.com (matched)
*      issuer: /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/emailAddress=premium-server&lt; at &gt;thawte.com
* SSL certificate verify ok.
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13
Host: nrtp.jetnet.aa.com
Referer: https://nrtp.jetnet.aa.com/NonRev2App/list_front.jsp?bInternational=false&amp;passengerNum=1
Cookie: JSESSIONID=0000LQfoEtxKh7NWnLbyWE4jvFr:134krsghb; portalNRTP=10%2F23%2F2008+8%3A57%3A29+AM; portalUser=00354611; SMSESSION=aokPyZ/LlXXu.....[ommitted].....mii0P0KHnFJ; SMIDENTITY=mKK82qk0n4j5k021.....[ommitted]...../UqggtNzsylyu07j8xw==; BIGipServerNRTP_YGP_80=880823818.20480.0000
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Content-Length: 190
Content-Type: application/x-www-form-urlencoded

100   190    0     0    0   190      0    176 --:--:--  0:00:01 --:--:--   176
100   190    0     0    0   190      0     91 --:--:--  0:00:02 --:--:--     0
100   190    0     0    0   190      0     61 --:--:--  0:00:03 --:--:--     0
100   190    0     0    0   190      0     46 --:--:--  0:00:04 --:--:--     0
100   190    0     0    0   190      0     37 --:--:--  0:00:05 --:--:--     0&lt; HTTP/1.1 200 OK
&lt; Date: Thu, 23 Oct 2008 13:59:02 GMT
&lt; Server: IBM_HTTP_Server
&lt; Content-Length: 697
&lt; Keep-Alive: timeout=10, max=100
&lt; Connection: Keep-Alive
&lt; Content-Type: text/html;charset=ISO-8859-1
&lt; Content-Language: en
* Replaced cookie BIGipServerNRTP_YGP_80="880823818.20480.0000" for domain nrtp.jetnet.aa.com, path /, expire 1224784747
&lt; Set-Cookie: BIGipServerNRTP_YGP_80=880823818.20480.0000; expires=Thu, 23-Oct-2008 17:59:07 GMT; path=/
&lt; 

100   887  100   697    0   190    126     34  0:00:05  0:00:05 --:--:--   114* Connection #0 to host nrtp.jetnet.aa.com left intact

The corresponding live HTTP headers output:

https://nrtp.jetnet.aa.com/NonRev2App/booking_f.jsp

POST /NonRev2App/booking_f.jsp HTTP/1.1
Host: nrtp.jetnet.aa.com
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16 FirePHP/0.1.2
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://nrtp.jetnet.aa.com/NonRev2App/list_front.jsp?bInternational=false&amp;passengerNum=1
Cookie: SMIDENTITY=GATyXfQkfjQb0ifk.....[ommitted].....J2pyCpJbsI41H4b8vi; BIGipServerNRTP_YGP_80=880823818.20480.0000; SMSESSION=xthlBYJmRvVxaUgpGu.....[ommitted].....Zaswzjg9mRvdPcnlO/L+o; JSESSIONID=0000oGKiY2hKIs8nO5s5Fd4nZ0t:134krsaai
Content-Type: application/x-www-form-urlencoded
Content-Length: 190
passengerNum=1&amp;bInternational=false&amp;seatType_1=Y&amp;tripDescription=JAX+%2F+MIA+-+09%2F27%2F2008&amp;passenger_1=1&amp;priority_1=D2&amp;ssr_1=x&amp;phone1=305+394-xxxx&amp;phone1Type=HOME&amp;phone2=0&amp;phone2Type=HOME

HTTP/1.x 200 OK
Date: Thu, 25 Sep 2008 19:01:58 GMT
Server: IBM_HTTP_Server
Set-Cookie: SMSESSION=RFc7KXBa/Osqm3b.....[ommitted].....wOwJSc3lu8xg+H4/DxcaAE0; path=/; domain=.aa.com
Set-Cookie: BIGipServerNRTP_YGP_80=880823818.20480.0000; expires=Thu, 25-Sep-2008 23:02:00 GMT; path=/
Content-Length: 673
Keep-Alive: timeout=10, max=100
Connection: Keep-Alive
Content-Type: text/html;charset=ISO-8859-1
Content-Language: en
-

Thanks for looking. I've been looking at this for sooo long. No suggestions will be overlooked.

David Colter

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

</description>
    <dc:creator>David Colter</dc:creator>
    <dc:date>2008-10-24T20:39:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3076">
    <title>curl_multi_wait?</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3076</link>
    <description>Dear curl/PHP folks,
Don't you think a function, that waits for all multi handles to finish or
timeout would be useful? Using curl_multi_select is a waste of time with fast
url-fetches. Calling curl_multi_exec repeatedly is also a wast of CPU cycles,
even ef you "sleep" a little between calls. I think a simple "curl_multi_wait"
that will return when al handles are done (success or timeout) would be a very
welcome addition. Implemented in the curl_ext, and not in PHP. Whom should I ask
to implement it? Are the extension's developers here. Anyone else agrees with me
that this is missing. Or do I miss something about how to use curl with PHP?
Thanks,
András

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
</description>
    <dc:creator>Andris Kardos</dc:creator>
    <dc:date>2008-10-24T10:41:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3073">
    <title>nss/ssl issue</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3073</link>
    <description>Hello everybody.

Here's what firefox's live headers addon show me ... I'm just trying to
make a simple script to login on that site just as my normal browser would
do ..
Anyone any ideas? Thanks in advance.

* Connected to etisalat.com.eg (196.219.46.2) port 80 (#0)
/pls/portal/portal.wwptl_login.show_site2pstoretoken?p_ref=XXXX_LOGIN_XXXXXX&amp;p_url=http%3A%2F%2Fetisalat.com.eg%2Fpls%2Fportal%2Furl%2Fpage%2F%2FEtisalat%2FLogin
HTTP/1.1
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.2)
Gecko/2008100707 Fedora/3.0.2-1.fc10 Firefox/3.0.2
Host: etisalat.com.eg
Accept: */*
Cookie:
portal=9.0.3+en-us+us+AMERICA+58E90945621D6F9CE04400144F3E96AB+3ECA006DxXXXxxXxxXxxxXX29EED8D85D9D8B2BDD677B5F68B8A4FED9A2A4DA4AB56D0DBBF13B0514EF8B3F551534627D2B08F0D5DC7FE5C26AD69FA77413ACB49E7B815374D9E7654589FB52E5FB497292D975C1563D

&lt; HTTP/1.1 200 OK
&lt; Cache-Control: max-age=0
&lt; Content-Type: text/html; charset=UTF-8
&lt; Server: Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server
OracleAS-Web-Cache-10g/10.1.2.0.2
(H;max-age=240+0;age=37;ecid=720577003xxx09813,0)
&lt; Content-Length: 609
&lt; Date: Fri, 10 Oct 2008 15:53:35 GMT
&lt; Content-Location:
/servlet/RepositoryServlet/portal/portal.wwptl_login.show_site2pstoretoken
&lt;
* Connection #0 to host etisalat.com.eg left intact
* About to connect() to auth.etisalat.com.eg port 443 (#1)
*   Trying 196.219.46.14... * connected
* Connected to auth.etisalat.com.eg (196.219.46.14) port 443 (#1)
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: /etc/pki/tls/certs/
* NSS error -12226
* Closing connection #1
* SSL connect error
* Closing connection #0


_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

</description>
    <dc:creator>S A.</dc:creator>
    <dc:date>2008-10-10T16:15:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3072">
    <title>unable to set private key file</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3072</link>
    <description>Hi guys

I am using cURL to connect to a secure web service via HTTPS and, from the
command-line, this works fine but from within PHP it doesn't. I've spent almost
a whole day trying to resolve this and can't see a solution so I thought someone
else might know.

I originally have a PKCS#12 combined multicertificate which I split into its
components:

openssl pkcs12 -in MULTICERT.p12 -out ca.pem -cacerts -nokeys
openssl pkcs12 -in MULTICERT.p12 -out client.pem -clcerts -nokeys
openssl pkcs12 -in MULTICERT.p12 -out key.pem -nocerts 

I set the PEM passphrase for the key to 'password' for testing, and test that
this all works via command-line:

curl -v --key ./key.pem --cacert ./ca.pem --cert ./client.pem:password
https://www.mbnet.pt/pvtn

I get a response back, which means that the keys are understood by cURL.

Translated into PHP, the code for the above line is:

$ch = curl_init();

curl_setopt($ch, CURLOPT_VERBOSE, '1');
curl_setopt($ch, CURLOPT_SSLKEY, 'key.pem');
curl_setopt($ch, CURLOPT_CAINFO, getcwd().'/ca.pem');
curl_setopt($ch, CURLOPT_SSLCERT, getcwd().'/client.pem');
curl_setopt($ch, CURLOPT_SSLCERTPASSWD, 'password');
curl_setopt($ch, CURLOPT_URL, "https://www.mbnet.pt/pvtn");

$result = curl_exec($ch);

The response I get is: unable to set private key file: 'key.pem' type PEM

This makes no sense, as surely since curl and libcurl are the same thing,
internally?

I read through the source code to try to find out what this meant; there is only
one reference to this error, in lib/ssluse.c:465:

case SSL_FILETYPE_ASN1:
if(SSL_CTX_use_PrivateKey_file(ctx, key_file, file_type) != 1) {
 failf(data, "unable to set private key file: '%s' type %s",
key_file, key_type?key_type:"PEM");

So it thinks my file is an ASN1 type, which it can't use. At least, that's what
it looks like from here.

For reference, I am using PHP 5.1.4 and:

curl 7.19.0 (i686-pc-linux-gnu) libcurl/7.19.0 OpenSSL/0.9.8b zlib/1.2.3
libidn/0.6.5 libssh2/0.17
Protocols: tftp ftp telnet dict http file https ftps scp sftp 
Features: IDN IPv6 Largefile NTLM SSL libz

Any suggestions? :)

Thanks,

Justin

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

</description>
    <dc:creator>Justin Finkelstein</dc:creator>
    <dc:date>2008-10-06T12:28:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.web.curl.php/3068">
    <title>help needed uploading file via a form</title>
    <link>http://comments.gmane.org/gmane.comp.web.curl.php/3068</link>
    <description>My system:
Linux 2.6.18-92.el5
PHP 5.1.6 (cli) (built: Jun 12 2008 05:02:35)
libcurl 7.15.5

I am trying to upload a file through a form. The steps I follow are:

1) visit the login page to get the __VIEWSTATE variable   &lt;--ok
2) login     &lt;--ok
3) visit the upload page to get __VIEWSTATE  &lt;-- ok
4) upload the file   &lt;-- NOT OK!!!

Here is the form:

&lt;form name="Form1" method="post" action="quote_upload.aspx" id="Form1"  
enctype="multipart/form-data"&gt;
&lt;input type="hidden" name="__VIEWSTATE" value="fickshurt" /&gt;
&lt;input name="file_path" id="file_path" type="file" style="WIDTH:  
392px; HEIGHT: 22px" size="46" /&gt;
&lt;input type="submit" name="upload_quote" value="Upload"  
id="upload_quote" /&gt;
&lt;/form&gt;

I have read a hundred web pages, tried a hundred different things, and  
all I get back is either 1) 403 Forbidden or 2) 500 Internal Server  
Error.

Here is the current set of CURLOPTs I'm using (some of which are  
currently commented out.

     curl_setopt($ch, CURLOPT_COOKIEFILE, $cookypath);
     //curl_setopt($ch, CURLOPT_COOKIEJAR, $cookypath);
     curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
     //curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
     //curl_setopt($ch, CURLOPT_REFERER, $upload_url);
     //curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
     //curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
     curl_setopt($ch, CURLOPT_HEADER, 1);
     curl_setopt($ch, CURLOPT_URL, $upload_url);
     curl_setopt($ch, CURLOPT_VERBOSE, 2);
     //curl_setopt($ch, CURLOPT_POST, 1);
     curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
     //curl_setopt($ch, CURLOPT_UPLOAD, 1);
     //curl_setopt($ch, CURLOPT_INFILE, $fp);
     //curl_setopt($ch, CURLOPT_INFILESIZE, filesize($uploadfile));
     curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);

Can somebody outline a solution or prompt me for more information?  
I've spent four days on this already.

Thanks,
TomT
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

</description>
    <dc:creator>Thomas Townsend</dc:creator>
    <dc:date>2008-09-29T17:25:16</dc:date>
  </item>
  <textinput about="http://search.gmane.org/?group=$group=gmane.comp.web.curl.php">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.web.curl.php</link>
  </textinput>
</rdf:RDF>
