i'm not sure that the info included in the docs is correct.

the patch I posted was actually TWO things.  it was a php file that contained the code for downloading the foriegn file.  the code included in the actual patch message was some JS code that validates the url and redirects the url to the required php script if required.

I think there is some more work required before it can be considered a working solution. eg: all images / links are now relative to the loading document and not the loaded document.  this will cause all relative links / images to be broken.

[EMAIL PROTECTED] wrote:

Patches item #415908, was updated on 2001-04-13 07:45
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305757&aid=415908&group_id=5757

Category: DynAPI 2 Other
Group: None
>Status: Closed
Priority: 5
Submitted By: Michael Pemberton (mpember)
Assigned to: Nobody/Anonymous (nobody)
Summary: Remote Server Loading in LoadPanel

Initial Comment:
I have found the attached php code allows me to download a page from a different server than the
original page.

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 method used by my readURL method for validating the url:

FileIO.baseHost='http://'+document.domain;
var loc=document.location.href;
FileIO.basePath=loc.substring(FileIO.baseHost.length,loc.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;
};

----------------------------------------------------------------------

>Comment By: Robert Rainwater (rainwater)
Date: 2001-04-14 16:45

Message:
Logged In: YES
user_id=16618

This information is now in the docs at:

http://dynapi.sourceforge.net/doccenter/index.php?Loading%
20Content%20from%20External%20Servers

----------------------------------------------------------------------

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305757&aid=415908&group_id=5757

_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev

--
Michael Pemberton
[EMAIL PROTECTED]
ICQ: 12107010
 

Reply via email to