----- Original Message ----- 
From: "Gordon Stewart"

          Hi there, Is there a PHP function to ENCRYPT text,

But which can then be de-crypted using Javascript... (below)....
-----------------------------
I think you are wanting to encode and decode rather than encrypt and
decrypt?
Encoding/decoding does NOT have a KEY where encryption uses a key to
decrypt.
There are NO functions common to PHP and Javascript that will allow an
encryption/decryption process.
If you do want to use an encryption process then you wil have to do it with
the 'math' elements of the DOM tree.

This is a really hard question to answer as you have not said what data/mime
type you wish to encode and how you expect to decode it or how important the
security is.

If you simply want to encode and decode then you can use a simple charactor
translation table.
This can be costructed in PHP and sent. Later the translation table and the
decode functions can be downloaded as a <script src="fixdata.js"> that will
only respond to the same session in PHP.
But this is very simple and a hacker would have no trouble craking it as the
translation table will only need to be obtained once unless you make it
dynamic.

Please define your needs more and I may be able to offer some code (script).

Reply via email to