Being as much direct as I can... does exists a way/tool to share/export PHP libraries remotely available to let them executed locally?
Let me dedetail a little bit better the need that I have:
I'm the web developper/administrator for some subdomains available on my company and each of them shares local data and it's installed and configured on a separate host
http://division-A.company.com (running on division-A.company.com)
http://division-B.company.com (running on division-B.company.com)
http://division-Z.company.com (running on division-C.company.com)
The different host are
Considering that the 3 different web host are maintained by me... do I have a chance to share with them some common php libraries.
I mean, for example:
Having a function available on [ host-A.company.com ]
webuser@host-A.company.com: /httpdocs/lib/helloworld.php
.
<?php
function HelloWorld() {
echo "You are on host " $_SERVER['SERVER_NAME'] . "
";
return(true);
}
?>
Can (in some way) import it on another host?
webuser@host-B.company.com: /httpdocs/lib/import_remote.php
.
<?php
include_once("http://division-A.company.com/lib/import_remote.php");
?>
But this approach (and it's more than clear why) does not work properly as the code is executed on remote host and not local one whereas my goal is to have a function that provide me a way to
The simplest way is to extract your library into separate repository, and include it as a dependency to all your sites via composer.