it is still a bit of a hack job but it may be of some ose to some of us looking for a method of downloading content from other domains.
The following is the mthod used by my readURL method for validating the url:
FileIO.baseHost='http://'+document.domain;
FileIO.basePath=document.location.href.substring(FileIO.baseHost.length,document.location.href.lastIndexOf("/")+1);
if (url.indexOf(':')!=-1) {
if (url.substring(0,4)!='http') return "Only
http: connections are allowed.";
else if (url.substring(0,FileIO.baseHost.length)!=FileIO.baseHost)
url=FileIO.baseHost+FileIO.basePath+'../../../php/afroapi/httpdownload.php4?url='+url;
} else {
if (url.charAt(0)!='/') url=FileIO.basePath+url;
url=FileIO.baseHost+url;
};
I hope this makes sense. as always, comments welcome.
--
Michael Pemberton
[EMAIL PROTECTED]
ICQ: 12107010
httpdownload.zip