3
Contributors
4
Replies
20
Views
3 Years
Discussion Span
Last Post by Wendy_1
0

An applet does not return readable HTML the way a regular page does. So no, I don't think it's possible.

1

don't expect to get other solution. It can be done, but it will be out of the ordinary. My answer is no and no :).

Why not? Because java applets are delivered between <applet></applet> tags. There is no way to parse the linked applet class.

<html>
<body>
<applet code="someJavaAppletClass.class"></applet>
</body>
</html>

The problem is that even if we follow the code attributes, the cURL will ended up downloading it, but will not be able to parse whatever the class output.

Even if we donwloaded the applet and convert it to some text file that can be read by PHP, it will be very difficult to guess the class output.

Take this simple lifted snippet from a working applet. This is just a part of the script just to give you the clear insight of what is going in the applet..

  private Image thisImage;
  private AppletContext context;
  public void init()
  {
      context = this.getAppletContext();
      String thisImageURL = this.getParameter("thisImage");
      if(thisImageURL == null)
      {
         thisImageURL = "test.jpg";
      }

We can matched the curly bracket, but thisImageURL will be difficult to capture. Unless, we use the line breaks BUT I honestly will not go and explore that possibilities. It is tidious process just to be able to parse the location of the test.jpg.

Good luck to you..and thank you for visiting Daniweb.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.