I'm testing one thing for my school project, where I need to connect to a single server, which is a website running on a home server, from multiple IPs for which I'd like to use AWS.
I have an AWS Free Tier microinstance, and I can buy multiple IPs for the machine. I will use either PHP/Python/Ruby to connect to a website and parse data from a counter on the site.
I'd like to run five scripts simultaneusly (using screen in Linux) on the instance, each with a separate IP connecting to the website every few seconds.
How can I force a script in PHP, Ruby or Python to use a certain connection, with a certain IP for outgoing connections from within the code without any system settings?
I know that it could be done using five instances, but it's more expensive and I'd really like to do it with a single instance. Is there any way to acheive this?
Thank you in advance!