I have various independent Wordpress websites installed on one server which all have the same custom post type. Now I would like to write a PHP program that imports data into these installations and populate this custom post type. This program is run every 60 seconds, checks whether there is a file in a specific directory and if yes, it imports data to one of the wordpress installations.
I implemented that program already and it works fine if I put it in one of the Wordpress sites and call it with the domain of that site. But this is a problem because I don't want to duplicate my import program and copy it to every site. I would rather have it in a separate location. Therefore my question: how can I tell my program to connect to a specific wordpress site?