I have a script on Ruby on Rails. It has to redirect to a PHP script in a different server. But I also need this PHP script to receive some data from Rails, preferably hidden somewhere (as raw data, or as a post).
Then the PHP will receive that data and do something with it (I actually want to start a session for the current user on the PHP server).
How can I acheieve this? Or something close to this?
I need something very similar to what happens when I submit an HTML form via POST. I need it to send data via POST AND to redirect to the given URL.
When I do
Net::HTTP.post_form(URI.parse(URL), {k: 'somek', u: someu, p: somep, e: somee})
It stays where it is.