cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: curl and http source code

From: Gabriel Kälin <Gabriel.Kaelin_at_visonys.com>
Date: Thu, 20 Mar 2008 08:19:25 +0100

> -----Original Message-----
> [mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Yong Wang
> Sent: Thursday, March 20, 2008 12:50 AM

> curl
> 'http://www.mergentonline.com/EdgarSearchResults.asp?textCompN
ame=&rdTextType=ticker&textTicker=IBM&textText=&textCIK=&textSIC> =&textFilingDate=&rdDate=inrange&textInRangeFrom=01%2F01%2F199
0&textInRangeTo=12%2F31%2F2006&optFilingType=3> &textFilingType=&Page=0&Search=Search'
>
> what I have is:
>
> <meta http-equiv='refresh' content=0;URL=Authenticate.asp>

Which means that you should authenticate yourself as this is a HTML-based redirect to Authenticate.asp.
Curl doesn't do anything with the response content. It's your task to parse the body.

Maybe you should look at how to handle cookies with curl.

>
> I also tried
>
> curl -U user:userpass -x proxyserver:8080
> 'http://www.mergentonline.com/EdgarSearchResults.asp?textCompN
ame=&rdTextType=ticker&textTicker=IBM&textText=&textCIK=&textSIC> =&textFilingDate=&rdDate=inrange&textInRangeFrom=01%2F01%2F199
0&textInRangeTo=12%2F31%2F2006&optFilingType=3> &textFilingType=&Page=0&Search=Search'
>
> got the same.

A website does not necessarily use this kind of authentication information. Anyway, you haven't specified what kind of authentication method you'd like to use, e.g. --basic. Maybe the website requires a form login which can't be handled by curl options. Instead you should use another curl request and keep the cookies that are returned returned. Use the options --cookie and/or --cookie-jar for this.

Gabriel
Received on 2008-03-20