Select to view content in your preferred language

RSS & crossdomain / alternative method

838
0
05-10-2011 03:40 PM
JeffAzevedo
Deactivated User
How I got around the RSS cross domain. (I know you can use a proxy, but I have limited access to our server, and that's why I came up with this method)

You will need iMacros (http://www.iopus.com/) to make this work. I am extracting the RSS source code from http://inciweb.org/feeds/rss/incidents/ and copying it to the clipboard. Once copied, I can then save it to a XML file that I have on IIS.  I run Task Scheduler on the server to basically refresh the RSS Data once a day, but you could set it for whatever you want. I haven�??t tested many RSS Feeds yet, but the one I needed to work does so without any trouble. Try it yourself, or simply change the URL GOTO= to something else.

Install iMacros, then make a shortcut to the iMacros executable and add one of the following to your target path:
(iMacros will close automatically, so use the �??noexit switch if you would like it to stay open. Give your macro a name after the #)
"C:\Program Files (x86)\iOpus\iMacros\iMacros.exe" -macro #YouriMacros
Or
"C:\Program Files (x86)\iOpus\iMacros\iMacros.exe" -macro #YouriMacros �??noexit

In Task Scheduler, setup a new basic task and target your shortcut. Select yes when Task Scheduler asks you if you want to apply these arguments.

From Internet Explorer, Right click on a demo code from the iMacros panel, and select edit iMacros. Copy and paste the code from below. Change the path and file name, then save the file and close.  Right click the iMacro and rename it to what you chose earlier. This is the name that follows the # sign from above.

The iMacros code:
VERSION BUILD=7311339
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://inciweb.org/feeds/rss/incidents/
SEARCH SOURCE=REGEXP:"(?s)(.*)" EXTRACT="$1"
SET !CLIPBOARD {{!EXTRACT}}
SAVEAS TYPE=TXT FOLDER=C:\inetpub\wwwroot\YourFolder FILE=YourXMLFile

Add your inetpub path, and the XML file name without the extension.  Make sure your GeoRSS widget calls the XML file and you should be good.
To test, simply launch the shortcut, launch the task or hit Play from the iMacros browser bar.
Tags (2)
0 Kudos
0 Replies