It is technically possible to have your website “turn around” and send requests somewhere before responding to an incoming request.
But:
In order for this to work, you’d need to have your personal computer up and running as a server 24/7, and you’d need to open up an incoming route in your router from the internet to your computer. In general, this is NOT A GOOD idea. You don’t want people of the internet trying to find weak spots in your own computer and your home network.
Instead, you might look into renting a virtual server for this. Obviously, you’ll need to very carefully check all kinds of security around it.
And you’re right. This has very little to do with WordPress. 🙂
Hi tobifjellner
I guess I wasn’t clear. I dont want to run this from my personal computer. I will put it in a place like GoDaddy, etc. My question is more the architecting this. Can WP make a call to the Python bot I will also have running in GoDaddy land? If so, how, what is an architecture that would work for this?
Thanks
Dean-O
If you need a plugin in WordPress to call another website, then you can use, for instance:
– https://developer.wordpress.org/reference/functions/wp_remote_get/
– https://developer.wordpress.org/reference/functions/wp_remote_post/
And further program in PHP what you need to do from the WordPress site.
But do you really need WordPress in this? Why not add the functions and formatting you need directly on the Python site?