cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: cURL beginners question

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 22 Apr 2001 19:48:44 +0200 (MET DST)

On Sun, 22 Apr 2001, Ben Schrijvers wrote:

(Cc'ing this reply to the curl mailing list)

> I'm trying to use cURL to automaticly download an htmlpage by letting
> cURL press a specific location of an image on an website.
>
> The page is working with the following form:
>
> <form method=post action="/cgi-bin/measuretest">
> <input type=image SRC="zwneder.gif" border=0>
> <input type=hidden name=red value=true>
> <input type=hidden name=map value=zwmswmap>
> <input type=hidden name=template value=template_mapmswwat>
> </form>
>
> The options that I give to cURL are the following:
>
> curl -d ".x=507&.y=95&red=true&map=zwmswmap&template=template_mapmswwat" \
> http://waterland.net/cgi-bin/measuretest
>
> Now I'm stuck because I can't figure out the parameters for the pixel
> location.

This is really easy to find out. Make a test HTML page, change the method in
that form to GET and click on the picture using your browser. Then you'll get
to see how it creates the request...

> Because the is no "name=" field for the image I can't use that name to
> create the parameters ????.x and ????.y

When there's no name on the picture, it isn't used. Then the coordinates are
specified such as "x=156&y=98" or similar. If you set a name=moo on the
image, then the coorinates will appear moo.x=156&moo.y=98...

> Could you please help me out and let me enjoy the power of cURL?

I'm certain you'll get this working now!

-- 
      Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Received on 2001-04-22