Video Game Forums

Go Back   Video Game Forums > Miscellaneous > Older Threads

Older Threads This is where most of our older threads are located. These threads can still be replied to.


S3 Player Stats & Sigs
Reply
 
LinkBack Thread Tools Display Modes
Old 12-23-2005   #1


 
Join Date: Jul 2005
Location: Lusby, MD
Age: 30
Posts: 183

Send a message via AIM to Casper Send a message via MSN to Casper
Exclamation S3 Player Stats & Sigs

To use any of these features, you must be in my database. To do so, go to my site and register. Link is in signature.

All stats are dependant on the SOCOM3.SCEA site. That is where the data is. If you register and your stats don't automatically pop up, it's because you have to wait for the script to pull your stats. Update times are as follows:
  • 10:00 AM EST
    2:00 PM EST
    5:00 PM EST
Once you register on my site you never have to come back, you can still use this awesome forum as your SOCOM 3 gateway.

Hold on while I wipe the tears from my eyes, and release my brainchild out into the world. If you don't know what this thread is in regard to please refer to the following link:
http://socom3.com/socom3/viewtopic.php?t=32892

Access Your Free XML Stats Here
If your SOCOM 3 Online screen name starts with a . like
Code:
.zimm.
In order to get your stats you must use the format:
Code:
http://www.eastcoastassassins.com/stats/1.zimm.xml
Otherwise just use your regular SOCOM 3 SN:
Code:
http://www.eastcoastassassins.com/stats/yoursocom3sn.xml
This is lower case sensitive. Even if your SOCOM 3 name has all caps - like mine - you must use lowecase letters.

Additional Features & Turorials:Coming Soon:
  • Online Status : 35%
    Challenge Simulator 2%
Let see how many people use them, and give the credit where it is due:
  • INSANE.CASPER
    OMEGA_MiKE
How many people will use these XML stats without PM'ing me for help on setting up the script to parse the stats. The only way I can pull your XML stats is for you to regsiter on my site, and complete the part on the registering page where your SOCOM 3 SN is asked for. That's how the code is set up. Unless the guys here want to set up the scripts on their site to do this, that's the way it's going to stay. If it is decided that they want to maintain the script I will work with them to set it up. You don't ever have to come back to the site, or post a message to be elidgable.

I am releasing the XML stats free of charge. I will not be releasing my script GPL. You can thank all the whiners for that. Anyway, if you do need moderate help, in the near future I will be posting a short tutorial on how to parse the XML.

Stickied -Cheesy
__________________

Casper is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 12-23-2005   #2


 
Join Date: Jul 2005
Location: Lusby, MD
Age: 30
Posts: 183

Send a message via AIM to Casper Send a message via MSN to Casper
Here you go, your cake and eat it too. Parse the XML from the site.
Code:
<?php
$insideitem = false;
$tag = "";
$stat = "";
$value = "";
function startElement($parser, $name, $attrs) {
	global $insideitem, $tag, $stat, $value;
	if ($insideitem) {
		$tag = $name;
	} elseif ($name == "ITEM") {
		$insideitem = true;
	}
}
function endElement($parser, $name) {
	global $insideitem, $tag, $stat, $value;
	if ($name == "ITEM") {
		printf("%s: %s
",
		trim($stat),trim($value));
		$stat = "";
		$value = "";
		$insideitem = false;
	}
}
function characterData($parser, $data) {
	global $insideitem, $tag, $stat, $value;
	if ($insideitem) {
	switch ($tag) {
		case "STAT":
		$stat .= $data;
		break;
		case "VALUE":
		$value .= $data;
		break;
	}
	}
}
$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");
$fp = fopen("http://www.eastcoastassassins.com/stats/insane.casper.xml","r")
	or die("Error reading RSS data.");
while ($data = fread($fp, 4096))
	xml_parse($xml_parser, $data, feof($fp))
		or die(sprintf("XML error: %s at line %d", 
			xml_error_string(xml_get_error_code($xml_parser)), 
			xml_get_current_line_number($xml_parser)));
fclose($fp);
xml_parser_free($xml_parser);
?>
__________________

Casper is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 12-23-2005   #3


 
Join Date: Jul 2005
Location: Lusby, MD
Age: 30
Posts: 183

Send a message via AIM to Casper Send a message via MSN to Casper
Parsing XML with ASP

There are two files associated with this process:

File 1 [parse.asp] (Where You Want The Code To Appear)
Code:
<%
xmlf = "http://www.eastcoastassassins.com/stats/insane.casper.xml"
stylef = "stat_style.xsl"		
set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
set xslDoc = Server.CreateObject("Microsoft.XMLDOM")	
xmlDoc.load(Server.Mappath(xmlf))
xslDoc.load(Server.Mappath(stylef))
Response.Write(xmlDoc.transformNode(xslDoc))
%>
File 2 [stat_style.xsl] (Tell ASP How To Handle The XML)
Code:
<xsl:stylesheet version="1.0">
<xsl:template match="/">
	<html>
	<body>
	<xsl:for-each select="news/item">
	<font color="#000000">
	
<xsl:value-of select="stat"/>
: 
</font>

: 
<xsl:value-of select="value"/>
 


</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Been a while since I've touched ASP, so this may require some tweeking. Although most servers handle PHP nowadays.
__________________

Casper is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 12-23-2005   #4


 
Join Date: Dec 2005
Posts: 11

Send a message via AIM to -Mangler-
I dont get it.....
__________________
203\'s Are For Newbs! End of story!

S3 name= -Mangler-

Clan= [€]lite [e]agles
-Mangler- is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 12-23-2005   #5


 
Join Date: Jul 2005
Location: Lusby, MD
Age: 30
Posts: 183

Send a message via AIM to Casper Send a message via MSN to Casper
Check out the following link:
http://socom3.com/socom3/viewtopic.php?t=32892

It's in regard to your SOCOM 3 Online stats.
__________________

Casper is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 12-23-2005   #6


 
Join Date: Dec 2005
Posts: 11

Send a message via AIM to -Mangler-
Why do it this way, when u i can just go to the official S3 website? Whats the difference?
__________________
203\'s Are For Newbs! End of story!

S3 name= -Mangler-

Clan= [€]lite [e]agles
-Mangler- is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 12-23-2005   #7


 
Join Date: Jul 2005
Location: Lusby, MD
Age: 30
Posts: 183

Send a message via AIM to Casper Send a message via MSN to Casper
This would only be of benefit to people that want to display their SOCOM 3 Online stats on their website. Like I do in my sig, or on my website. If you don't want to do that, then you don't need this.
__________________

Casper is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 12-23-2005   #8
 
Prophecy's Avatar


 
Join Date: Oct 2005
Location: St. Catherines,Ontario, Canada
Posts: 321

Send a message via AIM to Prophecy Send a message via MSN to Prophecy
It sounds pretty cool, but i suck, so until im a godsend to socom im am never putting my stats up. If you really wanna know how bad check out the ladder for me :D haha
__________________
Prophecy is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 12-23-2005   #9
Graphics Staff
 
discombobulate's Avatar


 
Join Date: Dec 2004
Location: Wethersfield, CT
Age: 19
Posts: 5,341

Send a message via AIM to discombobulate Send a message via Yahoo to discombobulate Send a message via Skype™ to discombobulate
You''re a beast Casper, a beast. Plain and simple. Great work.
__________________
And on the surface I became a normal pre-teen
More afraid of nuclear war than snake bites and bee stings
My best friend was my TV
Game shows and cartoons substituted for puppies, rainbows, and balloons
Now here I am, the shy type, and I think I'm doing alright
Considering what it was like, living my life
discombobulate is online now  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Old 12-23-2005   #10


 
Join Date: Dec 2005
Location: canada
Posts: 4

Send a message via AIM to -Shady
So, I know this is going to sound very very stupid. But I read the other thread. And I'm still confused on how to make this work.

Basically all I want to know is how to put it into a sig like you did casper. And I have no idea how to do it.

By the way. Since this actualy works. Congrats to you for doing this. it's a great idea.
-Shady is offline  
Digg this Post!Add Post to del.icio.us
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

S3 Player Stats & Sigs


All times are GMT -4. The time now is 07:47 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO