I want to encode an URL parameter with Ruby. The URL parameter not encoded is like this:
index.php?hash=tlNmgzWNFelvIH1o9ZAWFifpB3RwZOh6DCt5OdIfJCWLo9iZSRONWk1D1rEnSxUp|hi8JcsAHkznPkDFfaS1+xw==
Then I want to decode it from PHP!
I tried ruby:
ERB::Util::url_encode(param)
And then in Php urldecode($param); does not seem to work!
Use CGI::escape
on rubyside.
http://ruby-doc.org/stdlib-1.9.3/libdoc/cgi/rdoc/CGI.html#method-c-escape
url_encoded_string = CGI::escape("'Stop!' said Fred")
# => "%27Stop%21%27+said+Fred"