Q: form

R

[RaZoR]

Hi,

Is it possible based on that simple form below to determine the complete
string that is send to server after clicking "submit" button?
After clicking "submit" as a response I get a file from server.

I have to fill that form very often. Recently, I've found small program
that can retrieve any file if provided with exact link. I would like to
use that proggie and automate that process instead of filling this form
and submitting.

Is that possible to determine this exact link that is sent to server?

I would appreciate any help and suggestions,
[RaZoR]

<FORM NAME="dat" ACTION="http://www.srv.net/dir/file.dat" METHOD="POST">
<INPUT NAME="dat" VALUE="1">
<P>
<SELECT NAME="data">
<OPTION VALUE="2003" SELECTED>2003
<OPTION VALUE="2002">2002 </OPTION>
</SELECT>Year
<P>
<INPUT TYPE=RADIO NAME="border" VALUE="1">1<BR>
<INPUT TYPE=RADIO NAME="border" VALUE="2">2<BR>
<P>
<INPUT TYPE=CHECKBOX NAME="box_1" VALUE="1" CHECKED">some text<BR>
<INPUT TYPE=CHECKBOX NAME="box_2" VALUE="1">some text2<BR>
<P>
<INPUT <INPUT TYPE=SUBMIT VALUE="Submit">
</FORM>
 
B

brucie

R

[RaZoR]

hi,
what is sent to the server is:

POST http://www.srv.net/dir/file.dat HTTP/1.1
[lots of other stuff]
Posting 31 bytes...
dat=1
data=2003
box_1=1
box_2=1

change the form method to GET and the URI will appear in the browser
address field. it will look something like this:

http://www.srv.net/dir/file.dat?dat=1&data=2003&border=2&box_1=1&box_2=1

Thanks brucie :) I changed POST to GET and got the string. but is it
possible that [lots of other stuff] does make difference? because when I
have POST in this form (on local hdd) and click "submit" I receive a
file from server properly. but when I change POST to GET I receive
nothing.. :(

cheers,
RaZoR
 
B

brucie

hi,
what is sent to the server is:

POST http://www.srv.net/dir/file.dat HTTP/1.1
[lots of other stuff]
Posting 31 bytes...
dat=1
data=2003
box_1=1
box_2=1

change the form method to GET and the URI will appear in the browser
address field. it will look something like this:

http://www.srv.net/dir/file.dat?dat=1&data=2003&border=2&box_1=1&box_2=1
Thanks brucie :) I changed POST to GET and got the string. but is it
possible that [lots of other stuff] does make difference?

no, the full headers (for me) are:

+++GET 8294+++
Using Proxy - 207.236.109.122:80
POST http://www.srv.net/dir/file.dat HTTP/1.1
User-Agent: Opera/7.20 3087
Host: www.srv.net
Accept: text/html, application/xml;q=0.9, application/xhtml+xml;q=0.9,
image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: en;q=1.0
Accept-Charset: windows-1252, utf-8, utf-16, iso-8859-1;q=0.6, *;q=0.1
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
Referer: http://www.srv.net/dir/file.dat
TE: deflate, gzip, chunked, identity, trailers
Content-type: application/x-www-form-urlencoded
Content-length: 40
Connection: keep-alive
Posting 40 bytes...
dat=1
data=2003
border=1
box_1=1
box_2=1
because when I have POST in this form (on local hdd) and click "submit" I
receive a file from server properly.

i get a 404, i wasn't aware that the form was supposed to be live.
but when I change POST to GET I receive nothing..

the script that processes the form needs to be able to decode
method="get" as the way the data is encoded is different from
method="post". i would have thought it would handle it as the content
type used is for both methods but obviously not.
 
B

brucie

the script that processes the form needs to be able to decode
method="get" as the way the data is encoded is different from
method="post". i would have thought it would handle it as the content
type used is for both methods but obviously not.
^^^^
so i assumed the script was written to handle both
 
B

brucie

^^^^
so i assumed the script was written to handle both

no, i'm just an idiot with a small peepee. the form doesn't have an
enctype, the default is application/x-www-form-urlencoded which can be
used for get and post whereas multipart/form-data is just for post.
 
R

[RaZoR]

no, the full headers (for me) are:
+++GET 8294+++
Using Proxy - 207.236.109.122:80
POST http://www.srv.net/dir/file.dat HTTP/1.1
User-Agent: Opera/7.20 3087
Host: www.srv.net
Accept: text/html, application/xml;q=0.9, application/xhtml+xml;q=0.9,
image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: en;q=1.0
Accept-Charset: windows-1252, utf-8, utf-16, iso-8859-1;q=0.6, *;q=0.1
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
Referer: http://www.srv.net/dir/file.dat
TE: deflate, gzip, chunked, identity, trailers
Content-type: application/x-www-form-urlencoded
Content-length: 40
Connection: keep-alive
Posting 40 bytes...
dat=1
data=2003
border=1
box_1=1
box_2=1

BTW.. how do you get this information? is it possible in "windows 2000"
to see this printed that way?
the script that processes the form needs to be able to decode
method="get" as the way the data is encoded is different from
method="post". i would have thought it would handle it as the content
type used is for both methods but obviously not.

hmm.. that's a pity.. do you know if there is any method that allows to
encode values in a form "somehow" and send them via other program that
can handle these values properly as POST-encoded and retrieve a file? or
the only method is via browser?

cheers,
[RaZoR]
 
R

[RaZoR]

brucie said:
no, i'm just an idiot with a small peepee. the form doesn't have an
enctype, the default is application/x-www-form-urlencoded which can be
used for get and post whereas multipart/form-data is just for post.

multipart form data..? well, I didn't realise its importance, but there
is another form at this page. but I don't set anything there.. so I
presented only the part I can manipulate on..

cheers,
[RaZoR]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,574
Members
47,207
Latest member
HelenaCani

Latest Threads

Top