How can I insert text in input text from another web with php? How can I press a button on another website with php?
1: If you are the owner of the web and we are in a form for example, you can call the POST method by adding the corresponding variables, in this case using the answer 2. Alternatively you can use GET simply by calling the url from the answer 2 .
If your form to be sent is example.com/registrar?username=foo
Simply call that url from Curl.
2: You can use Curl for PHP, it allows you to consume data from urls and then process them on your server.
$ch = curl_init("http://www.example.com/");
$fp = fopen("example_homepage.txt", "w");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);
In that simple example, the response of the site is saved in a .txt file, you can also click on a button as you say, just call curl_init next to the url of the action that generates / performs the button.
Greetings.