cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: import progress javascript

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 25 Mar 2011 21:14:40 +0100 (CET)

On Fri, 25 Mar 2011, Sascha Schmidt wrote:

> I've written a shell script that automatically fills a form over several
> steps via curl. Its an import form of my web shop. On the last page it
> imports a csv file. If I do the import manually there's a javascript
> progress bar. The problem is, I have to keep the page open to make the
> import go on. It suddenly stops if I close the page and goes on if I open
> the page again. Any suggests how to do that with curl? "keeping the page
> open" ?

All the server receives for this is a series of HTTP requests. All the server
responds are replies to those requests. Your browser does a series of
requests, some of them quite likely using javascript, and the particular
sequence or so makes the javascript show some kind of progress bar while it is
working.

You can do that sequence of HTTP requests without a browser. All you need to
do is figure out which requests you need to do.

Firebug and livehttpheaders are two firefox plugins that are very helpful for
recording browser HTTP traffic. Use such a recording as a guidance when you
repeat the same "flow" using curl.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-03-25