HTML sends x y POST data with no inputs - how is t

2019-06-27 09:48发布

问题:

I am trying to logging using php's curl.

I am using LiveHTTPHeaders to see what headers are sent.

When I login through form it sends

action=autorize&login=myname&pass=mypass&x=14&y=10

I can see action, login, pass <inputs>.
The problem is - there are no x and y inputs. And they are random all the time. I searched all html, but there are definitely no any x, y or their numbers.

How is that possible at all?

回答1:

The x and y inputs are from an image input. From W3C:

An INPUT element with 'TYPE=IMAGE' specifies an image resource to display, and allows input of two form fields: the x and y coordinate of a pixel chosen from the image. The names of the fields are the name of the field with '.x' and '.y' appended. 'TYPE=IMAGE' implies 'TYPE=SUBMIT' processing; that is, when a pixel is chosen, the form as a whole is submitted.

http://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.1.2.5



回答2:

You are using an image as button. those are the coordinates clicked.



回答3:

It comes from input type="image" it auto submits the x and y coordinates that you have clicked on the submit button.



标签: http curl