Devam Ediyor

522375 Java Applet - Display Remote HTML with JS

I'm looking for a simple Java applet (including source code, of course) and the corresponding PHP page. All I need the applet to do is get the HTML contents of a remote URL and display it on the page using Javascript.

I've done my research and I think I'm probably 80-95% there but I must be doing something wrong. I'm developing in Eclipse and I did include the reference to [url removed, login to view] so that the applet compiles. I'm just looking for someone to help me finish it off. I NEED THIS DONE IN THE FORMAT BELOW. I DO NOT WANT SOMEONE TO START FROM SCRATCH. If your bid is over $100, don't bother. Here is the code:

***** BEGIN [url removed, login to view] *****

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url removed, login to view]">

<html xmlns="[url removed, login to view]">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

<script type="text/javascript">

function update(updatetext)

{

[url removed, login to view]('update').innerHTML = updatetext;

}

</script>

</head>

<body>

<applet code="[url removed, login to view]" width="300" height="300" style="border:1px solid #000;" mayscript="mayscript">

<param name="useragent" value="<? echo $_SERVER['HTTP_USER_AGENT']; ?>" />

<param name="url" value="[url removed, login to view]" />

</applet>

<div id="update">

No change yet

</div>

</body>

</html>

***** END [url removed, login to view] *****

***** BEGIN [url removed, login to view] ******

import java.applet.*;

import [url removed, login to view];

import [url removed, login to view];

import [url removed, login to view];

import [url removed, login to view];

import [url removed, login to view];

import [url removed, login to view];

import [url removed, login to view];

import [url removed, login to view];

import [url removed, login to view];

import [url removed, login to view];

public class GetHTML extends Applet

{

public void init()

{

String output = getUrlContent(getParameter("url"), "GET");

JSObject mainWindow = [url removed, login to view](this);

[url removed, login to view]("update('" + output + "');");

}

public void stop()

{

}

private String getUrlContent(String url, String httpMethod)

{

try

{

URL u = new URL(url);

HttpURLConnection conn = (HttpURLConnection)[url removed, login to view]();

[url removed, login to view](httpMethod);

[url removed, login to view]("User-Agent", getParameter("useragent"));

InputStream is = [url removed, login to view]();

ByteArrayOutputStream output = new ByteArrayOutputStream();

byte[] buffer = new byte[1024];

for (int bytesRead = 0; (bytesRead = [url removed, login to view](buffer)) != -1; )

{

[url removed, login to view](buffer, 0, bytesRead);

}

return [url removed, login to view]();

}

catch (Exception e)

{

[url removed, login to view]();

}

return null;

}

}

***** END [url removed, login to view] ******

Beceriler: Her şey Kabul, HTML, Java, Javascript, PHP, Araştırma, SEO, XML

Daha fazlasını görün: write my name on your body, write my name in style, using regex java, using regex in java, using regex in c, style your head, string source code java, string pattern, regex matcher, regex is, plugin applet, php string to html, php script null, php eclipse, pattern string, netscape net, js to write content in div, js do, java to applet, java source net, io.js, i need someone to write a javascript for me, import io, google js, get html code from url

İşveren Hakkında:
( 23 değerlendirme )

Proje NO: #2268313

Seçilen:

sushiljain11

I've done this project. You'll get the further work before you wake up.

1 gün içinde 95$ USD
(31 Değerlendirme)
4.9