We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I did some searching and the previous solutions don't apply to my situation.
I am trying to loadStrings("http://www.interpol.int");
I believe it's because of the ".int" domain extension, but I could be wrong.
This is throwing an error: java.io.IOException: Server returned HTTP response code: 403 for URL: http://www.interpol.int
It works with "interpol.com" but that site is no use because it embeds the frame from interpol.int and Processing can't access the frame.
[0] "<HTML>"
[1] "<HEAD>"
[2] "<TITLE>www.interpol.com</TITLE>"
[3] "<META NAME="robots" CONTENT="noindex">"
[4] "</HEAD>"
[5] "<FRAMESET FRAMESPACING="0" BORDER="0" FRAMEBORDER=No ROWS="100%,*">"
[6] " <FRAME SRC="http://www.interpol.int">"
[7] "</FRAMESET>"
[8] "<NOFRAMES>"
[9] "Sorry, your browser doesn't seem to support frames! <br>"
[10] "Proceed to <A href="http://www.interpol.int">http://www.interpol.int</A> manually."
[11] "</NOFRAMES>"
[12] "</HTML>"
I found some java code:
import java.net.*;
import java.io.*;
URL url;
void setup() {
try {
url = new URL("http://www.interpol.int");
} catch (MalformedURLException ex) {
throw new RuntimeException(ex);
}
loadStrings(url);
println(url);
}
class MyClass {
private URL url = new URL("http://www.interpol.int");
public MyClass() throws MalformedURLException {}
}
(Not sure why the code view is adding HTML wrappers to the URL's)
I am having trouble getting this to work with loadStrings();
"The method loadString(File) in the type PApplet is not applicable for the arguments(URL)"
What can I do?
Thx
Answers
this could be intentionally because they want everybody to use the frames
403 means forbidden
this works for other site but not for interpol
Here is the solution: