AndrewJ1313 Posted November 5, 2009 Share Posted November 5, 2009 I am working on a site which is utilizing some plug-ins from a another company. An item this other company is providing is a link to an XML file which is generated/updated daily. The owner of the site I am working on wants to have the information within this file visible on his home page in a side bar. If I save the XML file within his site and create the Spry data set, everything works beautifully, but if I create the data set linking to the XML file url, it doesn't work. Because this is information updated daily, I do not want to have to go into this site, save a new XML file and upload it daily. Within the Spry Framework Help in Dreamweaver, I found this: "The URL you decide to use (whether absolute or relative) is subject to the browser’s security model, which means that you can only load data from an XML source that is on the same server domain as the HTML page you’re linking from. You can avoid this limitation by providing a cross-domain service script. For more information, consult your server administrator." I contacted the other company about this cross-domain service script, but they didn't seem to have a solution. I have no idea where to begin or what to do to resolve this. Any suggestions are most appreciated. Thanks, Andrew Quote Link to comment https://forums.phpfreaks.com/topic/180420-cross-domain-service-script/ Share on other sites More sharing options...
RichardRotterdam Posted November 5, 2009 Share Posted November 5, 2009 Using javascript you indeed come accross the cross domain restriction. Here is how you can work around this. Write a serverside script that reads the the remote xml file (cURL, file_get_contents etc). Then simply read the local serverside script with javascript. Quote Link to comment https://forums.phpfreaks.com/topic/180420-cross-domain-service-script/#findComment-951814 Share on other sites More sharing options...
AndrewJ1313 Posted November 5, 2009 Author Share Posted November 5, 2009 Thanks for the feedback. I've never really spent any time with Javascript, so I have no idea how to do what you suggest. Can you provide a link to a tutorial or such? Thanks, Andrew Quote Link to comment https://forums.phpfreaks.com/topic/180420-cross-domain-service-script/#findComment-951848 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.