P
P
phpmidl2020-06-19 21:33:31
PHP
phpmidl, 2020-06-19 21:33:31

How to handle form result data of someone else's site?

Hi all. Please help me in which direction should I dig to solve the following problem using php?
There is a site A (mine)
There is a site B (not mine)
A user from my site (A) fills out a form and submits it. The data is filled in a form on a non-my site (B), and the result comes back to my site. I hope I explained clearly.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
F
FanatPHP, 2020-06-20
@FanatPHP

If this confusing explanation means that the user goes from site A to site B, fills out a form there, in which the action is a script on site A, then process as usual.
If the task is some other, then it is necessary to give birth to a normal description.
But first you need to discover that "a form on the site" does not exist. The form is always in the browser. From which site the browser loaded the form is completely unimportant. It is important which site the form action leads to.

N
Nadim Zakirov, 2020-06-19
@zkrvndm

You will need to write a special php proxy for these purposes. On your site, you get the completed form and send it to the second site using curl or file_get_contents, save the answer to your database and then do whatever you want with it.

V
Vladimir, 2020-06-20
@HistoryART

Parsing

M
Michael Aniskin, 2020-06-20
@MichaelAniskin

If the form is loaded into your site from another site (for example, in a frame or a div), then you can intercept data from the form using a java script on your site and send this data where you need it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question