cURL / Mailing Lists / curl-users / Single Mail


Re: Canīt load site with post

From: Daniel Stenberg <>
Date: Fri, 30 Nov 2001 10:50:39 +0100 (MET)

On Thu, 29 Nov 2001, Buro de Investigaciones Legales wrote:

> when I try to use the post option the curl try to make the job, but
> always download the main page. (deafult.asp)
> I thing that is someting about I need to pass some parameters or
> something, because when I do the thing in the page, (using the form in
> with IE ) its work, but when I use the curl does
> not work
> I use this: curl -L -d "Organismo=43&Buscar=Buscar&Fecha=22/11/2001"
> and always download the same page defaul.asp !!!!

There is only one way to know for sure why this happens, and that is by
asking the site admins and by checking their logs and programs/scripts.

Since I don't think that is what you wanted to hear, I can only advice you
based on guesses and experiences from other situations similar to yours.

1. Make sure that you set the user-agent field to make your requests to
   appear as if they are made with IE.

2. Make sure you record and repost all cookies that the remote site sends.
   It is a very common technique for sites to "connect" repeated requests and
   if you don't use cookies, they often refuse to work proprely.

3. At times the script checks your referer field to see that you came from
   a page on the site, to be allowed to get a page. If that is the case, you
   must set the referer header too.

4. Make absolutely sure that you post the fields in the same order etc that
   IE does, as sometimes stupid web scripts depend on the ordering and not
   the actual contents.

5. Your guess is as good as ours. Keep on trying variations.

Good luck!

    Daniel Stenberg -- curl groks URLs --
Received on 2001-11-30