How to open a form from another site with pre-populated fields with PHP / HTML / JAVASCRIPT?

Asked

Viewed 57 times

-1

Hello. I am improving the customers billet update on my website and need help. There is currently a refresh boleto button on the ADM page that users use, where it redirects users to the boleto update page of the bank site that they have chosen to use (an external site). Arriving at this page, there is a form with some fields asking information of the expired user’s ticket. Everything works perfectly, the only problem is the work that users go through filling out this form. I want to implement some method that automatically fills this data for users, however, I’m not able to find anything that helps me in this.

  • This other site, will you adapt it to receive the data, or can’t modify it? Only through your site, there is no way. It’s a security issue.

  • Do not modify it, but pass the data to it and thus fill in the fields contained in his form. Understand?

  • This question of yours allows us to interpret that you are trying to hack some site. If your intentions are good I recommend you rephrase the question. If you are going to do this, put what you have already tried to do. This is a site of technical doubts not a site to do things for you.

  • @Eduardomartinscasagrande this is the same as modifying.

  • Please take a look at tour and read the topic How to ask a good question? before posting. Good questions usually have a Minimum, Complete and Verifiable Example. Stackoverflow also has a Help center with much information. Grateful.

  • @Nelsonteixeira I’m sorry, that’s not what I meant. That’s better?

  • @Eduardomartinscasagrande in the question of what his intentions improved. But this is not the model of technical doubts of the site. The best use is some code that is presenting some problem and you put in the question so that the people see what the error. A question asking generically how to do something will hardly have any answer. You need to show some trouble code to be helped.

  • But just to look for help in some way, if it was a simple site, you might be able to wrap the entire external site in an element of your site. As it is a bank site I find it difficult you manage to do something like this because surely the security of the site will bar and see as an intrusion any change. Imagine if you could change the data of a bank site via Javascript at your will. Surely this would make the presence of banks on the Internet impossible. And since they are on the Internet, they have obviously already invented solutions to prevent this. Even for billets.

  • @Nelsonteixeira but for example, do you know when we fill out only one field of an address form and all the others are filled in automatically? There is no way to do something like this, but without the user having to type anything? I’m not looking to change anything on the external site, I need to just fill in the fields automatically.

  • This is done by the code of the site itself. Not from an external website.

Show 5 more comments

1 answer

0

It depends a lot on the bank. I don’t know if this is documented anywhere, but for example, in Banco do Brasil you can pass the parameters by GET:

https://www63.bb.com.br/portalbb/boleto/boletos/hc21e.bbx?campo1=00190&campo2=00009&campo3=01425&campo4=096029&campo5=31376&campo6=427170&campo7=9&campo8=75100000097571

It already shows the page with the values filled in in this case. You will need to do this for all the banks that your system supports. Your client will not have work, but in compensation you will suffer a little rs. Maybe you need to contact each bank to know how to proceed, or do as I did this test, I entered the page update boleto, saw the source of the form and in trial and error worked.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.