PDA

View Full Version : How do I pull information from one site and put their "live feed" on my site? not RSS



BlinkyBill01
30 Mar 2011, 02:34 AM
Hello all,

I have recently been given the green light from a videogame company to use their data from their site on mine. The only problem is their data is a "live feed" of their game stats.

I'm at a loss because I'm not too sure what data to pull and how to put it on my site so that I can access their live stats feed.

Here is their page: http://na.aiononline.com/livestatus/character-legion/search?charID=549083&serverID=1

What I need to pull is this:
http://www.virtueunited.com/010.png

and

http://www.virtueunited.com/011.png

Now, viewing their source, they have the following scripts relating to this feed:


<script type="text/javascript">
var AppletObjectOrder = '';
var AppletObj = null;

function AppletLoaded() {
LoadCharacter();
}

function LoadCharacter() {
try {
if (!AppletObj) {
setAppletObjectOrder();
}
var host = document.location.href;



AppletObj.LoadCharacter(549083, 1, host);


} catch (e) { }
}

function makeSignature() {
try {
if (!AppletObj) {
setAppletObjectOrder();
}
AppletObj.setSignature();
} catch (e) { }
}

function AlterSignatureEnd() {
var action = "/livestatus/character-legion/character/charactersigimg";
var parameters ={};
parameters.gameUid = 12936285;
parameters.charID = 549083;
parameters.serverID = 1;

new Ajax.Request(action, {
method : "post"
, asynchronous : false
, encoding : "UTF-8"
, parameters : parameters
, onSuccess : function(request) {sig_image.src = 'http://static.na.aiononline.com/aion'+request.responseText;}
, onFailure: function(request) {callAjaxFailure(request.status);}
}
);
}

function setAppletObjectOrder() {
var navName = navigator.appName;
var index = navName.indexOf("Explorer");
try{
if (navName.indexOf("Explorer") >= 0) {
var object = document.getElementsByTagName("OBJECT");
for (var i = 0 ; i < object.length; i++) {
var codebase = object[i].getAttribute('codebase');
if (codebase.indexOf("java.sun.com") >= 0) {
AppletObjectOrder = i;
break;
}
}
AppletObj = document.applets[AppletObjectOrder];
} else {
AppletObj = document.getElementById("JMEApplet");
}
}catch(e) { }
}

</script>

And these .css files:

http://static.na.aiononline.com/aion/common/css/livestatus_character_v2.css
http://static.na.aiononline.com/aion/common/css/livestatus.css
http://static.na.aiononline.com/aion/common/css/board.css

From the scripts above it pulls character data from:
parameters.gameUid = 12936285;
parameters.charID = 549083;
parameters.serverID = 1;

What I am looking to do is have players enter their charID and serverID manually into a box on my web site and after they submit the info and it pulls the data from the game web site and lists it on the players page of my site.

I just have no clue on how to go about it. I have seen similar things done on player fansites/guildsites for World of Warcraft, but any searches on how to do this type of thing for the Aion game comes up empty.

Does anyone know how to do this or can steer me in the right direction?

Any help or guidance would be appreciated.

Thanks,
Bill

BlinkyBill01
30 Mar 2011, 03:19 AM
Ok, I found a web site that is doing what I am actually looking to do. Sadly, they beat me to the punch.

This is the link to their site where a player can use a drop down to select the server then they add their character name.

http://aion.yg.com/add-character

If you choose "Siel" from the dropdown and type the name "Killer" it automatically adds the character info from the Aion website into their own database.

Here is the link that the info I gave makes:
http://aion.yg.com/character/killer?id=549083&sid=1&r=1

Now, I don't believe that this web site has the "live stats" from Aion. To me, that is okay. Just having the ability for a player to enter their information each time, and having the database update, is good enough for me.

So how would one go about creating this? I know a little about mySQL. At least enough to get by.