Jump to content

Encrypt JS variable and pass to PHP


YBthebest

Recommended Posts

Hello!

 

I've got an issue! I'm trying to pass a very very long variable from JS to PHP through $_GET, but it seems too long for get.

 

Is there any encryption function that works on both JS and PHP, so I can encrypt it in JS, send it though GET and decrypt it in PHP?

 

Thanks !

Link to comment
https://forums.phpfreaks.com/topic/220582-encrypt-js-variable-and-pass-to-php/
Share on other sites

Encrypted data is always longer than the non-encrypted version.

 

There's a maximum length for URL's (different for different browsers) and there are also limits that web servers will accept.

 

You would generally need to use POST to pass a large amount of data from the browser to a web server.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.