Autofill a form of another website and send it

前端 未结 2 1103
余生分开走
余生分开走 2020-12-20 04:32

I searched the web and found nothing.

On the website, there is a Input box for a E-Mail address. I would like to fill this field with an e-mail address and the send

2条回答
  •  北海茫月
    2020-12-20 05:07

    You can do this, but not the way you expect. To POST a form, you need to first fetch the source code for it (with Curl, or whatever your preference). For each input on the form, you store the name and give it a value. Then you need to send those values with their respective names to the action url of the form, using the method and enctype specified on the form.

提交回复
热议问题