informa
3 min read
article

Newsletter #58 - Cross-Site AJAX

Loradon 3.0 Preview progress update, development of a new site, cross-site AJAX, new sketches, and more.


News

Overall progress for the Loradon 3.0 Preview has reached 98%!
www.ifthensoftware.net/loradon_online/progress/


From the Programmer
Written by Invisible

I spent most of the past week brushing up on my HTML/CSS/javascript knowledge since we are working on a new site for IfThen Software. The site will use our Facebook page and my Twitter account as news sources, rather than have its own. However, while the widget provided by Twitter can be customized, the Facebook widget is fairly static. After testing the site, we decided that the widgets made it look ugly, so I started researching ways to get the Twitter and Facebook status without using their widgets.

Twitter provides an easy way to do this; visiting the address http://twitter.com/statuses/user_timeline/<name>.xml returns an xml document which includes all of the information for each status update (up to a max). Using XMLHttpRequest (a core part of AJAX) I can visit that site and parse the xml that it returns, displaying it in whatever format we need it in.

After unsuccessfully trying to find a similar link for Facebook, I started looking into alternatives such as parsing the Facebook page itself for the status. Doing so would not have been pretty. Luckily for me, johnhattan of #gamedev on AfterNet pointed out that the page has an RSS feed which I could use just as easily as the Twitter link.

Thus armed, I started work on the actual code to download and parse the xml returned by those two links. XMLHttpRequest makes this a very simple task; you just tell it where the page is, then wait for it to return the result. However, no matter what I tried, it kept returning a status code of 0 (200 means success, 0 means it didn't even get to the point where it could return a failure code). After looking around the internet for a solution, I finally found the cause; apparently the browser does not allow you to access a remote site using XMLHttpRequest. With this information in mind, I created a simple php script which accesses the Twitter/Facebook XML document and returns it. As far as the browser is concerned, it is connecting to the same website.


Artist's Easel
Written by GreyKnight

iScribble Sketches #16

(Click to enlarge)

(Click to enlarge)


Community Spotlight
Written by Jay

Just a week ago RageMan1990 decided to quit SAO and give his account information to the public. This came as quite a shock to the community because of his high level and seemingly great interest in the game. RageMan1990 will be missed by some, and disregarded by others.

Last week, InvisibleMan released information that a new ITS website is in the making. Many players and loyal fans had many questions about what the new site would look like, but to no avail; they were told to wait until it's released. We will do just that; and we look forward to the amazing new look.

Latest Jobs

Disbelief

Chicago, Illinois
05.10.22
Producer

Build a Rocket Boy Games

Edinburgh, Scotland
05.12.22
Lead Animation Programmer

Windwalk Games

Austin, Texas
05.16.22
Game Designer

Sucker Punch Productions

Bellevue, Washington
05.10.22
Campaign Director
More Jobs   

CONNECT WITH US

Register for a
Subscribe to
Follow us

Game Developer Account

Game Developer Newsletter

@gamedevdotcom

Register for a

Game Developer Account

Gain full access to resources (events, white paper, webinars, reports, etc)
Single sign-on to all Informa products

Register
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more