0

Is there an easy way to encrypt a string so that I can pass it to a .php which decrypts it?

Just a simple function which is fast and does not simply replace character n with x (I want to encrypt a URL so by using this simple replacement method would lead to http:// -> abbcdee for every url which is quite obvious).

I know that this isn't safe at all because it will be implemented in a local user client script but it's about increasing the effort for using my .php by someone who hasn't got my script.

Julius S.
  • 664
  • 9
  • 21
  • isn't cross origin policy enough? – Sebas Sep 17 '16 at 08:46
  • It's not about making the message secure but about making the access to the .php more secure. I want to pass a parameter-specific cookie to the php for access restriction. – Julius S. Sep 17 '16 at 08:47
  • but only from remote pages right? javascript to php is forbidden if not on the same domain I think... – Sebas Sep 17 '16 at 08:48
  • Now I'm getting what you mean. I want to prevent others from simply accessing the .php via browser or iframe in html (but I can't use htaccess because my script has to load the .php via iframe). – Julius S. Sep 17 '16 at 09:04

0 Answers0