is they a encrypt and decrypt that works with both php and java using a key. I ask this as i want to encrypt a string using PHP but need to decrypt it using Java.

I know i could write my own, but looking for something a bit more secure and tested.

Cheers

    Look for Mcrypt Encryption Functions in PHP.

      Why do you need to do this?

      If you want to pass stuff securely between a Java applet and PHP, JUST USE HTTPS!

      Mark

        i am wanting to hide email address from bot's and harvesters. I have used the dec/hex encoding however more well wrote and designed bots can still get your email address so this is where the following comes in.

        I want to hold the email address in a varible in php, this is ultimatly hidden from the source code. The idea is to pass the data from the php varible to a java varible.

        Once the varible is in java i can then use the document.write command to display the email address, however harvesters and bots wont be able to find it, as it doesnt exist as a plain email.

        Now i can make the java varible equal that of the php once easy by using an echo statement to output some java code saying x = y, but then i will end up with the email address visible in the java code.

        However to combat this problem my other solution would be to encrypt the php varbible, so when outputting the echo statment to java its not plain text, then use java to unecyrpt, then use the document.write funtion.

        This will be used on my own websites and wasnt to reduce the amount of spam as much as possible... 50 - 100 spam emails a day is now doing my head in. 😃

          U can also use ajax to retreive data from php and write it into a div or something and it wont be seen in view source ...

            ah this sounds more interesting, do you know how to do this? can you provide an example of this at all..

            Remembering i can use a process which requires the form to be reprocessed, it has to be done with the page loading the first time.

            cheers

              U can find lots of examples here on the forum and articles in the site about ajax.

              And there is always GOOGLE.

                lol.... just looking now...

                what i can tell to use ajax, it need to grab active x objects, which are then loaded/installed on the client side?

                my only consirn there is then compatibility for users, as sometimes when pages load which i am looking at and the active x bar apears i am a little reluctant to acept and fear this could be the case for others.

                  n_wattam wrote:

                  what i can tell to use ajax, it need to grab active x objects, which are then loaded/installed on the client side?

                  Where did u read this?

                  Look for xmlhttprequest but is known as ajax library and it is client/server side...

                    in some sample source code i saw a routine which looked like an active x object being grabbed from microsoft, and just guessed it was being downloaded/requested from there site.

                    I suppose the main question is!!! if i was to use ajax, do i or others need aditional pluging/active x etc installed on there pc or on the server php resides.

                      this looks way to complex for me at the moment...

                      Can anyone else help with the origonal question please, with an example.

                      cheers

                        Write a Reply...