-1

I have an HTML form on one server and I want to link it to a PHP file on another server. The other servers that has the PHP also has a database with files in it.

All my servers are free hosting accounts. I am starting my own business and I am using free hosting sites until I generate profits.

I need to link my MAIN.php file to other servers. Should I create a DatabaseFORM.php file in my MAIN server to send files to the other servers?

IF so, how would I send to all the servers from the DatabaseFORM.php file?

How do I execute PHP files on other serves from my MAIN.php file?

ok i realized that the PHP.ini file must allow server communication between php files from server to server.

will i be able to create a form on c+ to log into my servers and post to each server from my main form on my laptop? I think if i have the master form access each webpage with the form then i can have the master form, enter the values in each form and send.

is this possible?

Varoon
  • 11
  • 6
  • Correct me if I'm wrong, you have data in a server and you want to submit to another server? – Spoody Apr 10 '18 at 17:15
  • You may want to give a look to that subject : [including php file from another server with php](https://stackoverflow.com/questions/2752783/including-php-file-from-another-server-with-php) – Arthur Apr 10 '18 at 17:16

1 Answers1

1

To execute php file on other server simply use

$result = file_get_contents('http://example.com/something.php');

and if you want to show this data to user return them.

amin saffar
  • 1,953
  • 3
  • 22
  • 34