send Parameter to Java applet without html parmeter

How can i pass a string to an applet without using html parameter.

i will pass login data to an applet, it isn´t possible to put the login in the jar file because it is a component for a software, every user will have his own login data.

I found a solution to crypt the parameter but on the most php servers mycrypt isn´t active
thats why i can´t use this solution.

any solutions?
LVL 3
pekaboAsked:
Who is Participating?
 
CEHJConnect With a Mentor Commented:
>>PHP comes with a fairly comprehensive set of functions to create and manipulate socket communications; however, this capability is not enabled by default.

Unless you want to serve your applet from multiple hosts then i don't see why that should be a problem: you just need to enable PHP sockets on the server once
0
 
CEHJCommented:
>>i will pass login data to an applet,

How would you determine which user is using the applet and hence the correct data to send?
0
 
pekaboAuthor Commented:
Sorry I forgot to say this is an FTP login. Ii know that the FTP login send in clear-text, so you can sniff it but that's OK for now
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
CEHJCommented:
So you're using the applet to do an FTP login?
0
 
pekaboAuthor Commented:
yes i do
0
 
CEHJCommented:
OK. There's not much problem. Just send credentials from the applet gui. The only problem, as you rightly say, is the inherent insecurity of FTP. You'd be better of using SFTP of some sort
0
 
pekaboAuthor Commented:
In the background the users save the logins in a database or file direct acces to this file is not allowed.

The applet cant read the parameter because direct acces to this file is not allowed.
Now i can only pusch the login data to the applet parameter thru html in php,
php read the file or database and put the data as parameter in html.
problem everybody can read it.

thats why want  to send the parameter direct to the applet without a parameter in html.

does anybody have a code sample?
0
 
CEHJCommented:
>>Now i can only pusch the login data to the applet parameter thru html in php,

That would mean that all instances of the applet get the same data then ..?
0
 
pekaboAuthor Commented:
Yes this is tru. all instances of this applet get the same data
0
 
CEHJCommented:
Well if that's the case, why don't you simply have the applet make an http request for the info?
0
 
pekaboAuthor Commented:
Every http request that I made other users can made it also, at the end I have the same problem again the login data is visible.

At the moment I store the data in a php file, the login data is accessory encoded in Base64.
The encoded Base64 data you get only if you send the a post request with the correct username  and password. But all this is not save enough. Everybody can download the source look and see how it works.

To get more save, it would be the best if I can send the data direct from php to the applet
In php I say direct access to this file is not allowed. http request can´t get the login.
0
 
CEHJCommented:
>>Every http request that I made other users can made it also

In most scenarios, each request will come from a different IP

>>at the end I have the same problem again the login data is visible.

How would anything be visible if an applet makes its own URLConnection?
0
 
pekaboAuthor Commented:
because he makes a URLConnection to a php file. You can put this http address in the browser and you get the informations if they have the password for the php file an you can decode base64

Please back to topic.
How to send a Parameter to Java applet without html parmeter
0
 
CEHJCommented:
>>You can put this http address in the browser

They'd need to decompile the applet to *get* the address
0
 
pekaboAuthor Commented:
as i wrote: Everybody can download the source look and see how it works.
this component works on several pages the url is always the same.

I want to pass it direct, you now a way?
0
 
CEHJCommented:
The only way to pass something *to* an applet is via a socket, created by the applet, and it would have to be signed to do that.

I don't know why you don't get the applet to pull the info needed
0
 
pekaboAuthor Commented:
the applet is signed, he reads in a file on a server

>> I don't know why you don't get the applet to pull the info needed

It isn´t save enough because it is to simple to get the login
0
 
CEHJCommented:
If it's signed then there's no problem - simply open a socket with the applet and listen for the info
0
 
pekaboAuthor Commented:
do you have a tutorial or code how to this?
0
 
pekaboAuthor Commented:
PHP comes with a fairly comprehensive set of functions to create and manipulate socket communications; however, this capability is not enabled by default.

This is no option because its limited the use of my component nearly to zero.

if there is no other option i will accept your soltion as answer.
0
 
pekaboAuthor Commented:
This is a component for the comunity i dont think that the providers will change there settings.
if it would be only for me it would work.
0
 
pekaboAuthor Commented:
Sockets mostly allowed on the most webservers
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.