I heard somewhere that applets can only connect to the same server (host/ip) on which they reside.
If so, how can I connect to a server on say, some other IP address?
Ahh. I just need a trusted applet right? (Signed)
Typically, the answer is “you don’t”.
Theoretically, you should have NO reason to do this, because any time you think you do, you shouldn’t be doing an applet (you should be doing an app). Allegedly.
In practice, most people just run a small server application that you connect to, and which then connects to whatever remote server you wanted, and relays the information back.
These days it’s more tricky because most people with servers don’t have the ability to run their own software on the server (almost all servers are plain LAMPs; relatively few developers have root access to their hosting space).
What’s your particular use-case for which you need arbitrary connections?
I simply don’t have access to run anything else than PHP on my webserver
[quote]Ahh. I just need a trusted applet right? (Signed)
[/quote]
I’ve been wondering something for a while, but have been to lazy to test it out…
If I sign my applet, can it get unlimited access to the filesystem, to connect to remote servers, etc…? Or are applet’s also internally limited?
[quote]I simply don’t have access to run anything else than PHP on my webserver
[/quote]
(Sorry about the double post)
Why do you need to connect to another server? If you’re logging/retrieving data, maybe you could get/post to a php script to accomplish this. That’s what I’ve done in the past when I couldn’t run a java app on my remote server:
http://gaming.cyntaks.com/projects/viewproject.php?project=HSManager
I need realtime network performance, so that’s probably a no no.
I’ll whip up a test soon and let you guys know.