FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   LoadStrings problem
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: LoadStrings problem  (Read 566 times)
xoff

Email
LoadStrings problem
« on: Mar 24th, 2004, 6:29pm »

I'm trying to retrive text data from a URL. It work's fine on the processing app but it dosen't work on an applet. Does it only work on processing How can i display text data from a URL on an applet?  
 
please help
 
here is a sample code that i'm using
 
 
//////////////////////////////////////////////////////
// loadStrings test
 
String[] pagedata;
String strURL = "http://www.proce55ing.net";
BFont ft;  
 
void setup(){
  size(600,300);
  background(255,255,255);
  ft = loadFont("Meta.vlw.gz");
  textFont(ft, 10);
}
 
void loop(){
  fill(0,0,0,200);
  textSize(1;
  text(strURL,50,50);
  pagedata = loadStrings(strURL);
  text(pagedata[4], 50,100);  
}
//////////////////////////////////////////////////////
 

||||||||||||||||||||||||| 25% lodead
TomC

WWW
Re: LoadStrings problem
« Reply #1 on: Mar 24th, 2004, 6:34pm »

It's a security thing.  I think an applet can read data from the same domain as it was served from, but not others.
 
There may be a way around it if you can sign the applet.  Search for "sign applet" on this forum for more hints.
 
xoff

Email
Re: LoadStrings problem
« Reply #2 on: Mar 24th, 2004, 10:41pm »

Is there anyway around this problem without using a signed applet?
 

||||||||||||||||||||||||| 25% lodead
toxi_
Guest
Email
Re: LoadStrings problem
« Reply #3 on: Mar 25th, 2004, 12:30am »

you could use a simple server side script (PHP/Perl+LWP etc.) on your server to retrieve the external data and redirect it to your applet.
 
 
mm
Guest
Email
Re: LoadStrings problem
« Reply #4 on: Mar 25th, 2004, 9:55am »

see Taka's html visualization, which reads information from a URL without having a signed applet.  Search for "taka" -- or, search for applet signing which may help.
 
Pages: 1 

« Previous topic | Next topic »